hadoop2.7及spark伪分布式集群搭建
准备布一个hadoop的伪分布式集群(三台虚拟机master,slave1,slave2)1.操作系统: Linux: CentOS7 64 Bit Java: 1.8(自己下载了tar包,自带的配置起来较麻烦) Hadoop: 2.7.5(下载地址:https://blog.csdn.net/qq_36434219/article/details/80669692 )
·
准备布一个hadoop的伪分布式集群(三台虚拟机master,slave1,slave2)
1.操作系统:
Linux: CentOS7 64 Bit
Java: 1.8(自己下载了tar包,自带的配置起来较麻烦)
Hadoop: 2.7.5(下载地址:https://blog.csdn.net/qq_36434219/article/details/80669692 )
Spark: 2.2.1(下载地址:https://blog.csdn.net/qq_36434219/article/details/80669692 )
2.新建操作系统用户
root登录(三台机器操作一样):
新建 linux 用户 hadoop: useradd -d hadoop
设置 hadoop 用户口令: passwd hadoop
定义机器别名。修改/etc/hosts 文件,加入下列内容:
192.168.225.130 master
192.168.225.132 slave1
192.168.225.133 slave2
3.hadoop登录(三台机器操作一样):
配置$HOME/.bash_profile,加入下列内容:
# Java
export JAVA_HOME=/usr/local/java_64
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:${JRE_HOME}/bin:${PATH}
# Hadoop
export HADOOP_HOME=${HOME}/hadoop-2.7.5
export HADOOP_BIN=${HADOOP_HOME}/bin
export HADOOP_SBIN=${HADOOP_HOME}/sbin
export PATH=${PATH}:${HADOOP_BIN}:${HADOOP_SBIN}
export HADOOP_CONF_DIR=${HADOOP_HOME}/etc/hadoop
export HADOOP_COMMON_LIB_NATIVE_DIR=${HADOOP_HOME}/lib/native
export HADOOP_OPTS="-Djava.library.path=${HADOOP_HOME}/lib: ${HADOOP_COMMON_LIB_NATIVE_DIR}"
export YARN_CONF_DIR=${HADOOP_CONF_DIR}
export YARN_HOME=${HADOOP_HOME}
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${HADOOP_COMMO N_LIB_NATIVE_DIR}
# Spark
export SPARK_HOME=${HOME}/spark-2.2.1-bin-hadoop2.7
export PATH=${SPARK_HOME}/bin:${SPARK_HOME}/sbin:${PATH}
export CLASSPATH=${CLASSPATH}/lib:${SPARK_HOME}/lib
生效环境变量:source .bash_profile
可以改完一个文件之后直接拷贝到其他机器(scp $HOME/.bash_profile hadoop@slave1:$HOME)
4.配置 SSH 免密码登录(集群机器之间相互访问,实际环境中可能成百上千台,每次都输登录密码要累死了):
hadoop登录(三台机器操作一样):
ssh-keygen -t rsa(一路回车,会生成.ssh隐藏文件)
生成授权密钥:cat $HOME/.ssh/id_rsa.pub>>$HOME/.ssh/authorized_keys
验证步骤:ssh localhost(第一次要输入登录密码,以后再登录不再需要)
分别登录各台 Slave 机,将密钥上传至 master:
在slave1 执行:scp $HOME/.ssh/id_rsa.pub hadoop@master:$HOME/.ssh/id_rsa.pub.slave1
在slave2 执行: scp $HOME/.ssh/id_rsa.pub hadoop@master:$HOME/.ssh/id_rsa.pub.slave2
验证步骤:检查 id_rsa.pub.slave1 至 id_rsa.pub.slave2 都已上传至 master 的$HOME/.ssh 目录
合并授权密钥:
cat $HOME/.ssh/id_rsa.pub.slave1>>$HOME/.ssh/authorized_keys
cat $HOME/.ssh/id_rsa.pub.slave2>>$HOME/.ssh/authorized_keys
分发密钥:
scp $HOME/.ssh/authorized_keys hadoop@slave1:$HOME/.ssh/authorized_keys
scp $HOME/.ssh/authorized_keys hadoop@slave2:$HOME/.ssh/authorized_keys
验证步骤:从 master 机通过 ssh 登录 slave 机。
在 master 上执行:ssh slave1 无需输入密码,即可直接登录(第一次要输入登录密码,以后再登录不再需要)
在 slave01 上执行:ssh master1 无需输入密码,即可直接登录(第一次要输入登录密码,以后再登录不再需要)
5.安装JDK:
root登录:mkdir -p /usr/local/java_64 (安装JDK的路径)
hadoop登录:tar -zxvf JDK安装包 -C /usr/local/java_64
(会自动解压在一个文件下,把内容全部拷贝到java_64下面,注意和上面.bash_profile配置的路径保持一致 )
验证:执行 which java 正常显示应为 /usr/local/java_64/bin/java (和你配的一致)
6.安装&启动 Hadoop
hadoop登录:
tar xzf $HOME/install/hadoop-2.7.5.tar.gz -C $HOME
mkdir $HOME/hadoop-2.7.5/tmp
mkdir $HOME/hadoop-2.7.5/hdfs
mkdir $HOME/hadoop-2.7.5/hdfs/data
mkdir $HOME/hadoop-2.7.5/hdfs/name
修改配置文件$HOME/hadoop-2.7.5/etc/hadoop/hadoop-env.sh,将环境变量 JAVA_HOME改为绝对路径:
修改前:export JAVA_HOME=${JAVA_HOME}
修改后:export JAVA_HOME=/usr/local/java_64
修改配置文件$HOME/hadoop-2.7.5/etc/hadoop/yarn-env.sh,将环境变量 JAVA_HOME 改为绝对路径。
修改前:JAVA_HOME=${JAVA_HOME}
修改后:JAVA_HOME=/usr/local/java_64
修改配置文件$HOME/hadoop-2.7.5/etc/hadoop/core-site.xml,加入下列内容:
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://master:9000</value>
</property>
<property>
<name>hadoop.tmp.dir</name>
<value>file:///home/hadoop/hadoop-2.7.5/tmp</value>
</property>
<property>
<name>dfs.http.address</name>
<value>50070</value>
</property>
</configuration>
修改配置文件$HOME/hadoop-2.7.5/etc/hadoop/hdfs-site.xml,加入下列内容:
<configuration>
<property>
<name>dfs.namenode.secondary.http-address</name>
<value>master:50090</value>
</property>
<property>
<name>dfs.replication</name>
<value>3</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>file:///home/hadoop/hadoop-2.7.5/hdfs/name</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:///home/hadoop/hadoop-2.7.5/hdfs/data</value>
</property>
<property>
<name>dfs.permissions</name>
<value>false</value>
</property>
</configuration>
修改配置文件$HOME/hadoop-2.7.5/etc/hadoop/mapred-site.xml,加入下列内容:
<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
</configuration>
修改配置文件$HOME/hadoop-2.7.5/etc/hadoop/yarn-site.xml,加入下列内容:
<configuration>
<property>
<name>yarn.resourcemanager.address</name>
<value>master:8032</value>
</property>
<property>
<name>yarn.resourcemanager.scheduler.address</name>
<value>master:8030</value>
</property>
<property>
<name>yarn.resourcemanager.resource-tracker.address</name>
<value>master:8035</value>
</property>
<property>
<name>yarn.resourcemanager.admin.address</name>
<value>master:8033</value>
</property>
<property>
<name>yarn.resourcemanager.webapp.address</name>
<value>master:8088</value>
</property>
<property>
<description>Max available memory on each data node.</description>
<name>yarn.nodemanager.resource.memory-mb</name>
<value>4096</value>
</property>
<property>
<description>Max available cores data node.</description> <name>yarn.nodemanager.resource.cpu-vcores</name> <value>8</value>
</property>
<property>
<description>Minimum allocation unit.</description> <name>yarn.scheduler.minimum-allocation-mb</name> <value>256</value>
</property>
<property>
<description>Max allocation unit.</description> <name>yarn.scheduler.maximum-allocation-mb</name> <value>4096</value>
</property>
<property>
<description>Minimum increment setting – set to same as mi n-allocation.</description>
<name>yarn.scheduler.increment-allocation-mb</name> <value>256</value>
</property>
<property> <name>yarn.nodemanager.vmem-pmem-ratio</name> <value>2.5</value></property>
</configuration>
修改$HOME/hadoop-2.7.5/etc/hadoop/slaves 文件配置从节点, 改为:
slave1
slave2
分发 Hadoop 目录至各 Slave 机:
scp -r $HOME/hadoop-2.7.5 hadoop@slave1:$HOME
scp -r $HOME/hadoop-2.7.5 hadoop@slave2:$HOME
格式化 namenode:hadoop namenode –format
执行启动 HDFS 脚本:start-dfs.sh
执行启动 YARN 脚本:start-yarn.sh
验证:
在 master 上执行:jps
显示,例如:
30161 NameNode
30366 SecondaryNameNode
30543 ResourceManager
31348 Jps
在任意一台 slave 上执行:jps
显示,例如:
26434 DataNode
26551 NodeManager
hadoop登录master机器:
准备 Spark 安装目录:
tar xzf $HOME/install/spark-2.2.1-bin-hadoop2.7.tgz -C /$HOME
模板文件$SPARK_HOME/conf/slaves.template 复制为$SPARK_HOME/conf/slaves:
cp $SPARK_HOME/conf/slaves.template $SPARK_HOME/conf/slaves
在文件$SPARK_HOME/conf/slaves 中添加下列内容:
slave1
slave2
创建 Spark 本地目录:
mkdir $SPARK_HOME/tmp
模板文件$SPARK_HOME/conf/spark-env.sh.template 复制为$SPARK_HOME/conf/spark-env.sh:
cp $SPARK_HOME/conf/spark-env.sh.template $SPARK_HOME/conf/s park-env.sh
在文件$SPARK_HOME/conf/spark-env.sh 中添加下列内容:
export JAVA_HOME=/usr/local/java_64
export HADOOP_HOME=/home/hadoop/hadoop-2.7.5
export HADOOP_CONF_DIR=${HADOOP_HOME}/etc/hadoop
export SPARK_HOME=/home/hadoop/spark-2.2.1-bin-hadoop2.7
export SPARK_LOCAL_DIR=${SPARK_HOME}/tmp
export SPARK_LOCAL_IP=master
export SPARK_WORKER_MEMORY=1G
export SPARK_WORKER_CORES=4
export SPARK_WORKER_INSTANCE=4
export LD_LIBRARY_PATH=${HADOOP_HOME}/lib/native
为避免每次执行 Spark 任务都上传 jar 包到集群产生不必要的时间消耗,将jar 包上传到HDFS:
hadoop fs -mkdir /user hadoop fs -mkdir /user/hadoop
hadoop fs -mkdir /user/hadoop/spark_lib
hadoop fs -put $SPARK_HOME/jars/* /user/hadoop/spark_lib
模板文件$SPARK_HOME/conf/spark-defaults.conf.template 复制为$SPARK_HOME/conf/spark-defaults:
cp $SPARK_HOME/conf/spark-defaults.conf.template $SPARK_HOME/ conf/spark-defaults.conf
在文件$SPARK_HOME/conf/spark-defaults.conf 中添加下列内容:
spark.yarn.jars hdfs://master:9000/user/hadoop/spark_lib/*
分发Spark 目录至各 slave 机:
scp -r $SPARK_HOME hadoop@slave1:$HOME
scp -r $SPARK_HOME hadoop@slave2:$HOME
hadoop登录(所有slave机器):
将spark-env.sh 文件中的 SPARK_LOCAL_IP,改为各自的机器别名,例如:
修改前:export SPARK_LOCAL_IP=master
修改后:export SPARK_LOCAL_IP=slave1
因为 Hadoop 与 Spark 都有脚本 start-all.sh 和 stop-all.sh,为避免冲突:
cp $SPARK_HOME/sbin/start-all.sh $SPARK_HOME/sbin/spark-start-al l.sh
cp $SPARK_HOME/sbin/stop-all.sh $SPARK_HOME/sbin/spark-stop-all. sh
启动 Spark,执行脚本:spark-start-all.sh
在 master 上执行:jps
显示,例如:
7859 Master
8573 NameNode
8795 SecondaryNameNode
8958 ResourceManager
31673 Jps
在任意一台 slave 上执行:jps
显示,例如:
5577 DataNode
5694 NodeManager
23461 Jps
30326 Worker
1.操作系统:
Linux: CentOS7 64 Bit
Java: 1.8(自己下载了tar包,自带的配置起来较麻烦)
Hadoop: 2.7.5(下载地址:https://blog.csdn.net/qq_36434219/article/details/80669692 )
Spark: 2.2.1(下载地址:https://blog.csdn.net/qq_36434219/article/details/80669692 )
2.新建操作系统用户
root登录(三台机器操作一样):
新建 linux 用户 hadoop: useradd -d hadoop
设置 hadoop 用户口令: passwd hadoop
定义机器别名。修改/etc/hosts 文件,加入下列内容:
192.168.225.130 master
192.168.225.132 slave1
192.168.225.133 slave2
3.hadoop登录(三台机器操作一样):
配置$HOME/.bash_profile,加入下列内容:
# Java
export JAVA_HOME=/usr/local/java_64
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:${JRE_HOME}/bin:${PATH}
# Hadoop
export HADOOP_HOME=${HOME}/hadoop-2.7.5
export HADOOP_BIN=${HADOOP_HOME}/bin
export HADOOP_SBIN=${HADOOP_HOME}/sbin
export PATH=${PATH}:${HADOOP_BIN}:${HADOOP_SBIN}
export HADOOP_CONF_DIR=${HADOOP_HOME}/etc/hadoop
export HADOOP_COMMON_LIB_NATIVE_DIR=${HADOOP_HOME}/lib/native
export HADOOP_OPTS="-Djava.library.path=${HADOOP_HOME}/lib: ${HADOOP_COMMON_LIB_NATIVE_DIR}"
export YARN_CONF_DIR=${HADOOP_CONF_DIR}
export YARN_HOME=${HADOOP_HOME}
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${HADOOP_COMMO N_LIB_NATIVE_DIR}
# Spark
export SPARK_HOME=${HOME}/spark-2.2.1-bin-hadoop2.7
export PATH=${SPARK_HOME}/bin:${SPARK_HOME}/sbin:${PATH}
export CLASSPATH=${CLASSPATH}/lib:${SPARK_HOME}/lib
生效环境变量:source .bash_profile
可以改完一个文件之后直接拷贝到其他机器(scp $HOME/.bash_profile hadoop@slave1:$HOME)
4.配置 SSH 免密码登录(集群机器之间相互访问,实际环境中可能成百上千台,每次都输登录密码要累死了):
hadoop登录(三台机器操作一样):
ssh-keygen -t rsa(一路回车,会生成.ssh隐藏文件)
生成授权密钥:cat $HOME/.ssh/id_rsa.pub>>$HOME/.ssh/authorized_keys
验证步骤:ssh localhost(第一次要输入登录密码,以后再登录不再需要)
分别登录各台 Slave 机,将密钥上传至 master:
在slave1 执行:scp $HOME/.ssh/id_rsa.pub hadoop@master:$HOME/.ssh/id_rsa.pub.slave1
在slave2 执行: scp $HOME/.ssh/id_rsa.pub hadoop@master:$HOME/.ssh/id_rsa.pub.slave2
验证步骤:检查 id_rsa.pub.slave1 至 id_rsa.pub.slave2 都已上传至 master 的$HOME/.ssh 目录
合并授权密钥:
cat $HOME/.ssh/id_rsa.pub.slave1>>$HOME/.ssh/authorized_keys
cat $HOME/.ssh/id_rsa.pub.slave2>>$HOME/.ssh/authorized_keys
分发密钥:
scp $HOME/.ssh/authorized_keys hadoop@slave1:$HOME/.ssh/authorized_keys
scp $HOME/.ssh/authorized_keys hadoop@slave2:$HOME/.ssh/authorized_keys
验证步骤:从 master 机通过 ssh 登录 slave 机。
在 master 上执行:ssh slave1 无需输入密码,即可直接登录(第一次要输入登录密码,以后再登录不再需要)
在 slave01 上执行:ssh master1 无需输入密码,即可直接登录(第一次要输入登录密码,以后再登录不再需要)
5.安装JDK:
root登录:mkdir -p /usr/local/java_64 (安装JDK的路径)
hadoop登录:tar -zxvf JDK安装包 -C /usr/local/java_64
(会自动解压在一个文件下,把内容全部拷贝到java_64下面,注意和上面.bash_profile配置的路径保持一致 )
验证:执行 which java 正常显示应为 /usr/local/java_64/bin/java (和你配的一致)
6.安装&启动 Hadoop
hadoop登录:
tar xzf $HOME/install/hadoop-2.7.5.tar.gz -C $HOME
mkdir $HOME/hadoop-2.7.5/tmp
mkdir $HOME/hadoop-2.7.5/hdfs
mkdir $HOME/hadoop-2.7.5/hdfs/data
mkdir $HOME/hadoop-2.7.5/hdfs/name
修改配置文件$HOME/hadoop-2.7.5/etc/hadoop/hadoop-env.sh,将环境变量 JAVA_HOME改为绝对路径:
修改前:export JAVA_HOME=${JAVA_HOME}
修改后:export JAVA_HOME=/usr/local/java_64
修改配置文件$HOME/hadoop-2.7.5/etc/hadoop/yarn-env.sh,将环境变量 JAVA_HOME 改为绝对路径。
修改前:JAVA_HOME=${JAVA_HOME}
修改后:JAVA_HOME=/usr/local/java_64
修改配置文件$HOME/hadoop-2.7.5/etc/hadoop/core-site.xml,加入下列内容:
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://master:9000</value>
</property>
<property>
<name>hadoop.tmp.dir</name>
<value>file:///home/hadoop/hadoop-2.7.5/tmp</value>
</property>
<property>
<name>dfs.http.address</name>
<value>50070</value>
</property>
</configuration>
修改配置文件$HOME/hadoop-2.7.5/etc/hadoop/hdfs-site.xml,加入下列内容:
<configuration>
<property>
<name>dfs.namenode.secondary.http-address</name>
<value>master:50090</value>
</property>
<property>
<name>dfs.replication</name>
<value>3</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>file:///home/hadoop/hadoop-2.7.5/hdfs/name</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:///home/hadoop/hadoop-2.7.5/hdfs/data</value>
</property>
<property>
<name>dfs.permissions</name>
<value>false</value>
</property>
</configuration>
修改配置文件$HOME/hadoop-2.7.5/etc/hadoop/mapred-site.xml,加入下列内容:
<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
</configuration>
修改配置文件$HOME/hadoop-2.7.5/etc/hadoop/yarn-site.xml,加入下列内容:
<configuration>
<property>
<name>yarn.resourcemanager.address</name>
<value>master:8032</value>
</property>
<property>
<name>yarn.resourcemanager.scheduler.address</name>
<value>master:8030</value>
</property>
<property>
<name>yarn.resourcemanager.resource-tracker.address</name>
<value>master:8035</value>
</property>
<property>
<name>yarn.resourcemanager.admin.address</name>
<value>master:8033</value>
</property>
<property>
<name>yarn.resourcemanager.webapp.address</name>
<value>master:8088</value>
</property>
<property>
<description>Max available memory on each data node.</description>
<name>yarn.nodemanager.resource.memory-mb</name>
<value>4096</value>
</property>
<property>
<description>Max available cores data node.</description> <name>yarn.nodemanager.resource.cpu-vcores</name> <value>8</value>
</property>
<property>
<description>Minimum allocation unit.</description> <name>yarn.scheduler.minimum-allocation-mb</name> <value>256</value>
</property>
<property>
<description>Max allocation unit.</description> <name>yarn.scheduler.maximum-allocation-mb</name> <value>4096</value>
</property>
<property>
<description>Minimum increment setting – set to same as mi n-allocation.</description>
<name>yarn.scheduler.increment-allocation-mb</name> <value>256</value>
</property>
<property> <name>yarn.nodemanager.vmem-pmem-ratio</name> <value>2.5</value></property>
</configuration>
修改$HOME/hadoop-2.7.5/etc/hadoop/slaves 文件配置从节点, 改为:
slave1
slave2
分发 Hadoop 目录至各 Slave 机:
scp -r $HOME/hadoop-2.7.5 hadoop@slave1:$HOME
scp -r $HOME/hadoop-2.7.5 hadoop@slave2:$HOME
格式化 namenode:hadoop namenode –format
执行启动 HDFS 脚本:start-dfs.sh
执行启动 YARN 脚本:start-yarn.sh
验证:
在 master 上执行:jps
显示,例如:
30161 NameNode
30366 SecondaryNameNode
30543 ResourceManager
31348 Jps
在任意一台 slave 上执行:jps
显示,例如:
26434 DataNode
26551 NodeManager
32062 Jps
hadoop登录master机器:
准备 Spark 安装目录:
tar xzf $HOME/install/spark-2.2.1-bin-hadoop2.7.tgz -C /$HOME
模板文件$SPARK_HOME/conf/slaves.template 复制为$SPARK_HOME/conf/slaves:
cp $SPARK_HOME/conf/slaves.template $SPARK_HOME/conf/slaves
在文件$SPARK_HOME/conf/slaves 中添加下列内容:
slave1
slave2
创建 Spark 本地目录:
mkdir $SPARK_HOME/tmp
模板文件$SPARK_HOME/conf/spark-env.sh.template 复制为$SPARK_HOME/conf/spark-env.sh:
cp $SPARK_HOME/conf/spark-env.sh.template $SPARK_HOME/conf/s park-env.sh
在文件$SPARK_HOME/conf/spark-env.sh 中添加下列内容:
export JAVA_HOME=/usr/local/java_64
export HADOOP_HOME=/home/hadoop/hadoop-2.7.5
export HADOOP_CONF_DIR=${HADOOP_HOME}/etc/hadoop
export SPARK_HOME=/home/hadoop/spark-2.2.1-bin-hadoop2.7
export SPARK_LOCAL_DIR=${SPARK_HOME}/tmp
export SPARK_LOCAL_IP=master
export SPARK_WORKER_MEMORY=1G
export SPARK_WORKER_CORES=4
export SPARK_WORKER_INSTANCE=4
export LD_LIBRARY_PATH=${HADOOP_HOME}/lib/native
为避免每次执行 Spark 任务都上传 jar 包到集群产生不必要的时间消耗,将jar 包上传到HDFS:
hadoop fs -mkdir /user hadoop fs -mkdir /user/hadoop
hadoop fs -mkdir /user/hadoop/spark_lib
hadoop fs -put $SPARK_HOME/jars/* /user/hadoop/spark_lib
模板文件$SPARK_HOME/conf/spark-defaults.conf.template 复制为$SPARK_HOME/conf/spark-defaults:
cp $SPARK_HOME/conf/spark-defaults.conf.template $SPARK_HOME/ conf/spark-defaults.conf
在文件$SPARK_HOME/conf/spark-defaults.conf 中添加下列内容:
spark.yarn.jars hdfs://master:9000/user/hadoop/spark_lib/*
分发Spark 目录至各 slave 机:
scp -r $SPARK_HOME hadoop@slave1:$HOME
scp -r $SPARK_HOME hadoop@slave2:$HOME
hadoop登录(所有slave机器):
将spark-env.sh 文件中的 SPARK_LOCAL_IP,改为各自的机器别名,例如:
修改前:export SPARK_LOCAL_IP=master
修改后:export SPARK_LOCAL_IP=slave1
因为 Hadoop 与 Spark 都有脚本 start-all.sh 和 stop-all.sh,为避免冲突:
cp $SPARK_HOME/sbin/start-all.sh $SPARK_HOME/sbin/spark-start-al l.sh
cp $SPARK_HOME/sbin/stop-all.sh $SPARK_HOME/sbin/spark-stop-all. sh
启动 Spark,执行脚本:spark-start-all.sh
在 master 上执行:jps
显示,例如:
7859 Master
8573 NameNode
8795 SecondaryNameNode
8958 ResourceManager
31673 Jps
在任意一台 slave 上执行:jps
显示,例如:
5577 DataNode
5694 NodeManager
23461 Jps
30326 Worker
30125 Worker
貌似!!!!!!!!!!!!!!
本来想每一步都截图的,但是中间遇到各种问题,各种心累吧,最终整理这个文档,仅供参考!!!
错误整理参考(https://mp.csdn.net/postedit/80716567)
更多推荐
已为社区贡献6条内容
所有评论(0)