gpt4 book ai didi

apache-spark - 分别配置Spark和Hadoop(哪个版本将hadoop与spark配合使用)

转载 作者:行者123 更新时间:2023-12-02 19:13:46 24 4
gpt4 key购买 nike

我正在尝试使用hadoop 3.1.2配置spark 2.4.4,我已经成功安装了hadoop-3.1.2.tar.gz和spark-2.4.4-bin-without-hadoop.tgz,并且我已经构建了conf / spark- env.sh文件

export JAVA_HOME=/opt/jdk8u202-b08
export HADOOP_HOME=/home/hadoop/hadoop
export HADOOP_CONF_DIR=$HADOOP_HOME/etc/hadoop
export YARN_CONF_DIR=$HADOOP_HOME/etc/hadoop
export SPARK_HOME=/usr/local/spark
export SPARK_DIST_CLASSPATH=$HADOOP_HOME/etc/hadoop
export SPARK_DIST_CLASSPATH=($HADOOP_HOME/bin/hadoop classpath)

但是当我开始 Spark 壳
2019-11-27 11:53:07,051 WARN util.Utils: Your hostname, xxxxxxx resolves to a loopback address: 127.0.1.1; using 172.20.20.145 instead (on interface wlp2s0)
2019-11-27 11:53:07,052 WARN util.Utils: Set SPARK_LOCAL_IP if you need to bind to another address
2019-11-27 11:53:07,327 WARN util.NativeCodeLoader: 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://ashish-mittal:4040
Spark context available as 'sc' (master = local[*], app id = local-1574835792826).
Spark session available as 'spark'.
Welcome to
____ __
/ __/__ ___ _____/ /__
_\ \/ _ \/ _ `/ __/ '_/
/___/ .__/\_,_/_/ /_/\_\ version 2.4.4
/_/

Using Scala version 2.11.12 (OpenJDK 64-Bit Server VM, Java 1.8.0_202)
Type in expressions to have them evaluated.
Type :help for more information.

scala>

如何检查带有Spark的hadoop的哪个版本

最佳答案

Spark使用HADOOP_HOME并从那里加载类路径,因此您下载的版本是它将使用的版本

请注意,Spark尚未完全支持Hadoop3。

关于apache-spark - 分别配置Spark和Hadoop(哪个版本将hadoop与spark配合使用),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59066760/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com