人妻少妇精品久久久久久蜜臀av,久久综合激激的五月天,日韩精品无码专区免费播放,欧美精品999

kb3189866

前沿拓展:

kb3189866

下載 KB3189866 **更新包,試試!


我用的是VM虛擬機,**作系統(tǒng)是RedHat7.9的系統(tǒng)進行JDK和Hadoop的安裝實施,

本過程只是作測試和學習參考用。

1、添加hadoop新用戶

useradd -m hadoop -s /bin/bash # 添加hadoop用戶

passwd hadoop # 配置hadoop用戶的密碼

vi /etc/sudoers #編輯配置文件 在root后一行加入 hadoop ALL=(ALL) ALL ,為hadoop添加管理員權(quán)限

2、配置免密登錄(root)用戶**作

ssh-keygen -t rsa # 會有提示,都按回車就OK

cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys # 加入授權(quán)

chmod 0600 ~/.ssh/authorized_keys #添加權(quán)限

配置完成后,執(zhí)行ssh hadoop(主機名)命令可以不用輸入密碼即可登錄為配置成功。

如查發(fā)現(xiàn)生成ssh-keygen報錯,這是沒有安裝openssh造成的,用yum安裝即可。

[root@hadoop dfs]# rpm -qa |grep openssh
openssh-server-7.4p1-21.el7.x86_64
openssh-clients-7.4p1-21.el7.x86_64
openssh-7.4p1-21.el7.x86_64

3、配置JDK環(huán)境

下載JDK的安裝包之后,將jdk安裝到/usr/local/jdk 這個目錄。

tar -zxvf /home/hadoop/download/jdk-8u212-linux-x64.tar.gz -C /usr/local/jdk/

添加環(huán)境變量

vi /etc/profile # 打開環(huán)境變量配置文件,添加下面的配置

# java環(huán)境變量配置

export JAVA_HOME=/usr/local/jdk

export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH

# 配置完成后 執(zhí)行下面命令是配置生效

source /etc/profile

順便把HADOOP_HOME的環(huán)境變量也一起添加了

# hadoop環(huán)境變量配置

export HADOOP_HOME=/usr/local/hadoop

export PATH=$HADOOP_HOME/bin:$JAVA_HOME/**in:$PATH

[root@hadoop download]# cat /etc/profile
unset i
unset -f pathmunge
export JAVA_HOME=/usr/local/jdk/jdk1.8.0_212
export PATH=$JAVA_HOME/bin:$PATH
export HADOOP_HOME=/usr/local/hadoop/hadoop-3.1.3
export PATH=$HADOOP_HOME/bin:$PATH
export PATH=$HADOOP_HOME/**in:$PATH

java環(huán)境是否配置成功,我們執(zhí)行java -version 可以看到java相關(guān)的信息

[root@hadoop download]# java -version
java version "1.8.0_212"
Java(TM) SE Runtime Environment (build 1.8.0_212-b10)
Java HotSpot(TM) 64-Bit Server VM (build 25.212-b10, mixed mode)

4、安裝配置Hadoop

Hadoop NameNode格式化及運行測試,接下來對hadoop進行一些配置,使其能以偽分布式的方式運行。進入到hadoop的配置文件所在的目錄

cd /usr/local/hadoop/etc/hadoop配置hadoop-env.sh

在該文件內(nèi)配置JAVA_HOME 所示:

vi /usr/local/hadoop/hadoop-3.1.3/etc/hadoop/hadoop-env.sh
###
# Generic settings for HADOOP
###

# Technically, the only required environment variable is JAVA_HOME.
# All others are optional. However, the defaults are probably not
# preferred. Many sites configure these options outside of Hadoop,
# such as in /etc/profile.d

# The java implementation to use. By default, this environment
# variable is REQUIRED on ALL platforms except OS X!
export JAVA_HOME=/usr/local/jdk/jdk1.8.0_212

# Location of Hadoop. By default, Hadoop will attempt to determine
# this location based upon its execution path.
export HADOOP_HOME=/usr/local/hadoop/hadoop-3.1.3

JAVA_HOME設置為我們自己的jdk安裝路徑即可

1、配置hdfs-site.xml

hdfs-site.xml的內(nèi)容改成下面的配置。

<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>file:/home/hadoop_data/dfs/name</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/home/hadoop_data/dfs/data</value>
</property>
</configuration>dfs.replication # 為文件保存副本的數(shù)量
dfs.namenode.name.dir # 為hadoop namenode數(shù)據(jù)目錄,改成自己需要的目錄(不存在需新建)
dfs.datanode.data.dir # 為hadoop datanode數(shù)據(jù)目錄,改成自己需要的目錄(不存在需新建)

1、配置core-site.xml

core-site.xml的內(nèi)容改成下面的配置。

<configuration>
<property>
<name>hadoop.tmp.dir</name>
<value>file:/home/hadoop_data</value>
</property>
<property>
<name>fs.defaultFS</name>
<value>hdfs://hadoop:9000</value>
</property>
</configuration>hadoop.tmp.dir # hadoop 緩存目錄,更改為自己的目錄(不存在需創(chuàng)建)
fs.defaultFS # hadoop fs **端口配置
mkdir /home/hadoop_data/dfs/name
mkdir /home/hadoop_data/dfs/data
cd /home/hadoop_data/
chown -R hadoop:hadoop dfs && chmod -R 777 dfs

如果只需要HDFS,配置就完成,如果需要用到Y(jié)arn,還需要做yarn相關(guān)的配置。

1、配置mapred-site.xml

mapred-site.xml的內(nèi)容改成下面的配置。

<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
</configuration>

1、配置yarn-site.xml

yarn-site.xml的內(nèi)容改成下面的配置。

<configuration>
<!– Site specific YARN configuration properties –>
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
</configuration>

Hadoop格式化及啟動

現(xiàn)在hadoop基礎配置已經(jīng)完成了,需要對Hadoop的namenode進行格式化,第二啟動hadoop dfs服務。

1、NameNode格式化我們跳轉(zhuǎn)到hadoop的bin目錄,并執(zhí)行格式化命令

cd /usr/local/hadoop/bin
./hdfs namenode -format

執(zhí)行結(jié)果如下圖所示,當exit status 為0時,則為格式化成功。

此時我們的hadoop已經(jīng)格式化成功了,接下來我們?nèi)游覀僪adoop。

進到hadoop下的**in目錄

cd /usr/local/hadoop/**in
./start-dfs.sh # 啟動HDFS
./start-yarn.sh # 啟動YARN

執(zhí)行./start-dfs.sh 如下圖所示:

[hadoop@hadoop ~]$ stop-dfs.sh
Stopping namenodes on [hadoop]
Stopping datanodes
Stopping secondary namenodes [hadoop]
[hadoop@hadoop ~]$ start-dfs.sh
Starting namenodes on [hadoop]
Starting datanodes
Starting secondary namenodes [hadoop]
[hadoop@hadoop ~]$ jps
48336 Jps
48002 DataNode
48210 SecondaryNameNode
46725 NodeManager
46621 ResourceManager
47886 NameNode
[hadoop@hadoop ~]$

還可以看日志看是不啟動報錯

[hadoop@hadoop logs]$ ls -rlt
total 2528
-rw-rw-r–. 1 hadoop hadoop 0 Mar 17 23:15 SecurityAuth-hadoop.audit
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 09:37 hadoop-hadoop-datanode-hadoop.out.5
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 09:38 hadoop-hadoop-secondarynamenode-hadoop.out.5
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:04 hadoop-hadoop-namenode-hadoop.out.5
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:04 hadoop-hadoop-datanode-hadoop.out.4
-rw-rw-r–. 1 hadoop hadoop 4124 Mar 18 10:05 hadoop-hadoop-secondarynamenode-hadoop.out.4
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:06 hadoop-hadoop-namenode-hadoop.out.4
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:06 hadoop-hadoop-datanode-hadoop.out.3
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:31 hadoop-hadoop-namenode-hadoop.out.3
-rw-rw-r–. 1 hadoop hadoop 121390 Mar 18 10:50 hadoop-hadoop-secondarynamenode-hadoop.out.3
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:51 hadoop-hadoop-namenode-hadoop.out.2
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:52 hadoop-hadoop-datanode-hadoop.out.2
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:52 hadoop-hadoop-secondarynamenode-hadoop.out.2
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:53 hadoop-hadoop-datanode-hadoop.out.1
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:54 hadoop-hadoop-secondarynamenode-hadoop.out.1
-rw-rw-r–. 1 hadoop hadoop 6151 Mar 18 10:55 hadoop-hadoop-namenode-hadoop.out.1
-rw-rw-r–. 1 hadoop hadoop 2215 Mar 18 14:42 hadoop-hadoop-resourcemanager-hadoop.out
-rw-rw-r–. 1 hadoop hadoop 2199 Mar 18 14:43 hadoop-hadoop-nodemanager-hadoop.out
-rw-rw-r–. 1 hadoop hadoop 41972 Mar 18 14:52 hadoop-hadoop-resourcemanager-hadoop.log
-rw-rw-r–. 1 hadoop hadoop 37935 Mar 18 15:42 hadoop-hadoop-nodemanager-hadoop.log
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 15:48 hadoop-hadoop-namenode-hadoop.out
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 15:48 hadoop-hadoop-datanode-hadoop.out
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 15:48 hadoop-hadoop-secondarynamenode-hadoop.out
-rw-rw-r–. 1 hadoop hadoop 970190 Mar 18 15:48 hadoop-hadoop-datanode-hadoop.log
drwxr-xr-x. 2 hadoop hadoop 6 Mar 18 15:48 userlogs
-rw-rw-r–. 1 hadoop hadoop 572169 Mar 18 15:49 hadoop-hadoop-namenode-hadoop.log
-rw-rw-r–. 1 hadoop hadoop 656741 Mar 18 15:49 hadoop-hadoop-secondarynamenode-hadoop.log
[hadoop@hadoop logs]$ pwd
/usr/local/hadoop/hadoop-3.1.3/logs
[hadoop@hadoop logs]$ tail -20f hadoop-hadoop-namenode-hadoop.log
2022-03-18 15:48:39,521 INFO org.apache.hadoop.hdfs.StateChange: BLOCK* registerDatanode: from DatanodeRegistration(192.168.10.248:9866, datanodeUuid=daafd206-fdfe-44cc-a1fc-8ac1279c5cda, infoPort=9864, infoSecurePort=0, ipcPort=9867, storageInfo=lv=-57;cid=CID-f921bab0-7c73-44ef-bc61-ea81d176ec82;nsid=311459717;c=1647534325420) storage daafd206-fdfe-44cc-a1fc-8ac1279c5cda
2022-03-18 15:48:39,523 INFO org.apache.hadoop.net.NetworkTopology: Adding a new node: /default-rack/192.168.10.248:9866
2022-03-18 15:48:39,523 INFO org.apache.hadoop.hdfs.server.blockmanagement.BlockReportLeaseManager: Registered DN daafd206-fdfe-44cc-a1fc-8ac1279c5cda (192.168.10.248:9866).
2022-03-18 15:48:39,889 INFO org.apache.hadoop.hdfs.server.blockmanagement.DatanodeDescriptor: Adding new storage ID DS-6dd0b7dc-1fd0-488c-924b-76de306ac2cb for DN 192.168.10.248:9866
2022-03-18 15:48:40,062 INFO BlockStateChange: BLOCK* processReport 0xf15bae747aec7666: Processing first storage report for DS-6dd0b7dc-1fd0-488c-924b-76de306ac2cb from datanode daafd206-fdfe-44cc-a1fc-8ac1279c5cda
2022-03-18 15:48:40,065 INFO BlockStateChange: BLOCK* processReport 0xf15bae747aec7666: from storage DS-6dd0b7dc-1fd0-488c-924b-76de306ac2cb node DatanodeRegistration(192.168.10.248:9866, datanodeUuid=daafd206-fdfe-44cc-a1fc-8ac1279c5cda, infoPort=9864, infoSecurePort=0, ipcPort=9867, storageInfo=lv=-57;cid=CID-f921bab0-7c73-44ef-bc61-ea81d176ec82;nsid=311459717;c=1647534325420), blocks: 0, hasStaleStorage: false, processing time: 3 msecs, invalidatedBlocks: 0
2022-03-18 15:49:44,972 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: Roll Edit Log from 192.168.10.248
2022-03-18 15:49:44,972 INFO org.apache.hadoop.hdfs.server.namenode.FSEditLog: Rolling edit logs
2022-03-18 15:49:44,973 INFO org.apache.hadoop.hdfs.server.namenode.FSEditLog: Ending log segment 85, 85
2022-03-18 15:49:44,973 INFO org.apache.hadoop.hdfs.server.namenode.FSEditLog: Number of transactions: 2 Total time for transactions(ms): 2 Number of transactions batched in Syncs: 84 Number of syncs: 2 SyncTimes(ms): 130
2022-03-18 15:49:44,988 INFO org.apache.hadoop.hdfs.server.namenode.FSEditLog: Number of transactions: 2 Total time for transactions(ms): 2 Number of transactions batched in Syncs: 84 Number of syncs: 3 SyncTimes(ms): 144
2022-03-18 15:49:44,990 INFO org.apache.hadoop.hdfs.server.namenode.FileJournalManager: Finalizing edits file /home/hadoop_data/dfs/name/current/edits_inprogress_0000000000000000085 -> /home/hadoop_data/dfs/name/current/edits_0000000000000000085-0000000000000000086
2022-03-18 15:49:44,992 INFO org.apache.hadoop.hdfs.server.namenode.FSEditLog: Starting log segment at 87
2022-03-18 15:49:45,514 INFO org.apache.hadoop.hdfs.server.namenode.TransferFsImage: Sending fileName: /home/hadoop_data/dfs/name/current/fsimage_0000000000000000083, fileSize: 533. Sent total: 533 bytes. Size of last segment intended to send: -1 bytes.
2022-03-18 15:49:45,641 INFO org.apache.hadoop.hdfs.server.namenode.TransferFsImage: Sending fileName: /home/hadoop_data/dfs/name/current/edits_0000000000000000084-0000000000000000084, fileSize: 1048576. Sent total: 1048576 bytes. Size of last segment intended to send: -1 bytes.
2022-03-18 15:49:45,744 INFO org.apache.hadoop.hdfs.server.namenode.TransferFsImage: Sending fileName: /home/hadoop_data/dfs/name/current/edits_0000000000000000085-0000000000000000086, fileSize: 42. Sent total: 42 bytes. Size of last segment intended to send: -1 bytes.
2022-03-18 15:49:46,668 INFO org.apache.hadoop.hdfs.server.common.Util: Combined time for file download and fsync to all disks took 0.00s. The file download took 0.00s at 0.00 KB/s. Synchronous (fsync) write to disk of /home/hadoop_data/dfs/name/current/fsimage.ckpt_0000000000000000086 took 0.00s.
2022-03-18 15:49:46,668 INFO org.apache.hadoop.hdfs.server.namenode.TransferFsImage: Downloaded file fsimage.ckpt_0000000000000000086 size 533 bytes.
2022-03-18 15:49:46,684 INFO org.apache.hadoop.hdfs.server.namenode.NNStorageRetentionManager: Going to retain 2 images with txid >= 83
2022-03-18 15:49:46,684 INFO org.apache.hadoop.hdfs.server.namenode.NNStorageRetentionManager: Purging old image FSImageFile(file=/home/hadoop_data/dfs/name/current/fsimage_0000000000000000081, cpktTxId=0000000000000000081)

這就是namenode啟動成功,如查格式化兩次就會出現(xiàn)datanode啟動不成功,這是clusterID兩次不致造成的,可以進入

-rw-rw-r–. 1 hadoop hadoop 229 Mar 18 15:48 VERSION
drwx——. 4 hadoop hadoop 54 Mar 18 15:48 BP-301391941-192.168.10.248-1647534325420
[root@hadoop current]# cat VERSION
#Fri Mar 18 15:48:38 CST 2022
storageID=DS-6dd0b7dc-1fd0-488c-924b-76de306ac2cb
clusterID=CID-f921bab0-7c73-44ef-bc61-ea81d176ec82
cTime=0
datanodeUuid=daafd206-fdfe-44cc-a1fc-8ac1279c5cda
storageType=DATA_NODE
layoutVersion=-57
[root@hadoop current]# pwd
/home/hadoop_data/dfs/data/current
修改clusterID和namenode節(jié)點的clusterID一樣后,在重啟hadoop服務

現(xiàn)在偽分布式hadoop集群已經(jīng)部署成功了,如果啟動hadoop的時候遇到了問題,可以查看對應的log文件查看是由什么問題引起的。一般的問題如,未設置JAVA_HOME hadoopdata目錄不存在,或者無權(quán)限等等。

現(xiàn)要在可以進入hadoop組件hdfs的UI界面:

kb3189866

現(xiàn)要在可以進入hadoop組件yarn的UI界面:

kb3189866

可能安裝過成會遇到各樣的問題,可是查看日志和搜索或是去官網(wǎng)站都可以找到解決的**,我只是把做的過程記錄出來了,以備后需。

拓展知識:

kb3189866

有的機器升級不僅僅一次不成功,有時候反復升級都是這樣,這樣的情況我在升級補丁的時候也遇到過!比如:升級W10周年版本的14393(kb3189866)的時候更新到45%就卡住了,沒辦法進一步的往下進行,最后還是在論壇里找到升級的下載包解決了!

前沿拓展:

kb3189866

下載 KB3189866 **更新包,試試!


我用的是VM虛擬機,**作系統(tǒng)是RedHat7.9的系統(tǒng)進行JDK和Hadoop的安裝實施,

本過程只是作測試和學習參考用。

1、添加hadoop新用戶

useradd -m hadoop -s /bin/bash # 添加hadoop用戶

passwd hadoop # 配置hadoop用戶的密碼

vi /etc/sudoers #編輯配置文件 在root后一行加入 hadoop ALL=(ALL) ALL ,為hadoop添加管理員權(quán)限

2、配置免密登錄(root)用戶**作

ssh-keygen -t rsa # 會有提示,都按回車就OK

cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys # 加入授權(quán)

chmod 0600 ~/.ssh/authorized_keys #添加權(quán)限

配置完成后,執(zhí)行ssh hadoop(主機名)命令可以不用輸入密碼即可登錄為配置成功。

如查發(fā)現(xiàn)生成ssh-keygen報錯,這是沒有安裝openssh造成的,用yum安裝即可。

[root@hadoop dfs]# rpm -qa |grep openssh
openssh-server-7.4p1-21.el7.x86_64
openssh-clients-7.4p1-21.el7.x86_64
openssh-7.4p1-21.el7.x86_64

3、配置JDK環(huán)境

下載JDK的安裝包之后,將jdk安裝到/usr/local/jdk 這個目錄。

tar -zxvf /home/hadoop/download/jdk-8u212-linux-x64.tar.gz -C /usr/local/jdk/

添加環(huán)境變量

vi /etc/profile # 打開環(huán)境變量配置文件,添加下面的配置

# java環(huán)境變量配置

export JAVA_HOME=/usr/local/jdk

export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH

# 配置完成后 執(zhí)行下面命令是配置生效

source /etc/profile

順便把HADOOP_HOME的環(huán)境變量也一起添加了

# hadoop環(huán)境變量配置

export HADOOP_HOME=/usr/local/hadoop

export PATH=$HADOOP_HOME/bin:$JAVA_HOME/**in:$PATH

[root@hadoop download]# cat /etc/profile
unset i
unset -f pathmunge
export JAVA_HOME=/usr/local/jdk/jdk1.8.0_212
export PATH=$JAVA_HOME/bin:$PATH
export HADOOP_HOME=/usr/local/hadoop/hadoop-3.1.3
export PATH=$HADOOP_HOME/bin:$PATH
export PATH=$HADOOP_HOME/**in:$PATH

java環(huán)境是否配置成功,我們執(zhí)行java -version 可以看到java相關(guān)的信息

[root@hadoop download]# java -version
java version "1.8.0_212"
Java(TM) SE Runtime Environment (build 1.8.0_212-b10)
Java HotSpot(TM) 64-Bit Server VM (build 25.212-b10, mixed mode)

4、安裝配置Hadoop

Hadoop NameNode格式化及運行測試,接下來對hadoop進行一些配置,使其能以偽分布式的方式運行。進入到hadoop的配置文件所在的目錄

cd /usr/local/hadoop/etc/hadoop配置hadoop-env.sh

在該文件內(nèi)配置JAVA_HOME 所示:

vi /usr/local/hadoop/hadoop-3.1.3/etc/hadoop/hadoop-env.sh
###
# Generic settings for HADOOP
###

# Technically, the only required environment variable is JAVA_HOME.
# All others are optional. However, the defaults are probably not
# preferred. Many sites configure these options outside of Hadoop,
# such as in /etc/profile.d

# The java implementation to use. By default, this environment
# variable is REQUIRED on ALL platforms except OS X!
export JAVA_HOME=/usr/local/jdk/jdk1.8.0_212

# Location of Hadoop. By default, Hadoop will attempt to determine
# this location based upon its execution path.
export HADOOP_HOME=/usr/local/hadoop/hadoop-3.1.3

JAVA_HOME設置為我們自己的jdk安裝路徑即可

1、配置hdfs-site.xml

hdfs-site.xml的內(nèi)容改成下面的配置。

<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>file:/home/hadoop_data/dfs/name</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/home/hadoop_data/dfs/data</value>
</property>
</configuration>dfs.replication # 為文件保存副本的數(shù)量
dfs.namenode.name.dir # 為hadoop namenode數(shù)據(jù)目錄,改成自己需要的目錄(不存在需新建)
dfs.datanode.data.dir # 為hadoop datanode數(shù)據(jù)目錄,改成自己需要的目錄(不存在需新建)

1、配置core-site.xml

core-site.xml的內(nèi)容改成下面的配置。

<configuration>
<property>
<name>hadoop.tmp.dir</name>
<value>file:/home/hadoop_data</value>
</property>
<property>
<name>fs.defaultFS</name>
<value>hdfs://hadoop:9000</value>
</property>
</configuration>hadoop.tmp.dir # hadoop 緩存目錄,更改為自己的目錄(不存在需創(chuàng)建)
fs.defaultFS # hadoop fs **端口配置
mkdir /home/hadoop_data/dfs/name
mkdir /home/hadoop_data/dfs/data
cd /home/hadoop_data/
chown -R hadoop:hadoop dfs && chmod -R 777 dfs

如果只需要HDFS,配置就完成,如果需要用到Y(jié)arn,還需要做yarn相關(guān)的配置。

1、配置mapred-site.xml

mapred-site.xml的內(nèi)容改成下面的配置。

<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
</configuration>

1、配置yarn-site.xml

yarn-site.xml的內(nèi)容改成下面的配置。

<configuration>
<!– Site specific YARN configuration properties –>
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
</configuration>

Hadoop格式化及啟動

現(xiàn)在hadoop基礎配置已經(jīng)完成了,需要對Hadoop的namenode進行格式化,第二啟動hadoop dfs服務。

1、NameNode格式化我們跳轉(zhuǎn)到hadoop的bin目錄,并執(zhí)行格式化命令

cd /usr/local/hadoop/bin
./hdfs namenode -format

執(zhí)行結(jié)果如下圖所示,當exit status 為0時,則為格式化成功。

此時我們的hadoop已經(jīng)格式化成功了,接下來我們?nèi)游覀僪adoop。

進到hadoop下的**in目錄

cd /usr/local/hadoop/**in
./start-dfs.sh # 啟動HDFS
./start-yarn.sh # 啟動YARN

執(zhí)行./start-dfs.sh 如下圖所示:

[hadoop@hadoop ~]$ stop-dfs.sh
Stopping namenodes on [hadoop]
Stopping datanodes
Stopping secondary namenodes [hadoop]
[hadoop@hadoop ~]$ start-dfs.sh
Starting namenodes on [hadoop]
Starting datanodes
Starting secondary namenodes [hadoop]
[hadoop@hadoop ~]$ jps
48336 Jps
48002 DataNode
48210 SecondaryNameNode
46725 NodeManager
46621 ResourceManager
47886 NameNode
[hadoop@hadoop ~]$

還可以看日志看是不啟動報錯

[hadoop@hadoop logs]$ ls -rlt
total 2528
-rw-rw-r–. 1 hadoop hadoop 0 Mar 17 23:15 SecurityAuth-hadoop.audit
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 09:37 hadoop-hadoop-datanode-hadoop.out.5
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 09:38 hadoop-hadoop-secondarynamenode-hadoop.out.5
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:04 hadoop-hadoop-namenode-hadoop.out.5
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:04 hadoop-hadoop-datanode-hadoop.out.4
-rw-rw-r–. 1 hadoop hadoop 4124 Mar 18 10:05 hadoop-hadoop-secondarynamenode-hadoop.out.4
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:06 hadoop-hadoop-namenode-hadoop.out.4
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:06 hadoop-hadoop-datanode-hadoop.out.3
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:31 hadoop-hadoop-namenode-hadoop.out.3
-rw-rw-r–. 1 hadoop hadoop 121390 Mar 18 10:50 hadoop-hadoop-secondarynamenode-hadoop.out.3
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:51 hadoop-hadoop-namenode-hadoop.out.2
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:52 hadoop-hadoop-datanode-hadoop.out.2
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:52 hadoop-hadoop-secondarynamenode-hadoop.out.2
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:53 hadoop-hadoop-datanode-hadoop.out.1
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:54 hadoop-hadoop-secondarynamenode-hadoop.out.1
-rw-rw-r–. 1 hadoop hadoop 6151 Mar 18 10:55 hadoop-hadoop-namenode-hadoop.out.1
-rw-rw-r–. 1 hadoop hadoop 2215 Mar 18 14:42 hadoop-hadoop-resourcemanager-hadoop.out
-rw-rw-r–. 1 hadoop hadoop 2199 Mar 18 14:43 hadoop-hadoop-nodemanager-hadoop.out
-rw-rw-r–. 1 hadoop hadoop 41972 Mar 18 14:52 hadoop-hadoop-resourcemanager-hadoop.log
-rw-rw-r–. 1 hadoop hadoop 37935 Mar 18 15:42 hadoop-hadoop-nodemanager-hadoop.log
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 15:48 hadoop-hadoop-namenode-hadoop.out
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 15:48 hadoop-hadoop-datanode-hadoop.out
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 15:48 hadoop-hadoop-secondarynamenode-hadoop.out
-rw-rw-r–. 1 hadoop hadoop 970190 Mar 18 15:48 hadoop-hadoop-datanode-hadoop.log
drwxr-xr-x. 2 hadoop hadoop 6 Mar 18 15:48 userlogs
-rw-rw-r–. 1 hadoop hadoop 572169 Mar 18 15:49 hadoop-hadoop-namenode-hadoop.log
-rw-rw-r–. 1 hadoop hadoop 656741 Mar 18 15:49 hadoop-hadoop-secondarynamenode-hadoop.log
[hadoop@hadoop logs]$ pwd
/usr/local/hadoop/hadoop-3.1.3/logs
[hadoop@hadoop logs]$ tail -20f hadoop-hadoop-namenode-hadoop.log
2022-03-18 15:48:39,521 INFO org.apache.hadoop.hdfs.StateChange: BLOCK* registerDatanode: from DatanodeRegistration(192.168.10.248:9866, datanodeUuid=daafd206-fdfe-44cc-a1fc-8ac1279c5cda, infoPort=9864, infoSecurePort=0, ipcPort=9867, storageInfo=lv=-57;cid=CID-f921bab0-7c73-44ef-bc61-ea81d176ec82;nsid=311459717;c=1647534325420) storage daafd206-fdfe-44cc-a1fc-8ac1279c5cda
2022-03-18 15:48:39,523 INFO org.apache.hadoop.net.NetworkTopology: Adding a new node: /default-rack/192.168.10.248:9866
2022-03-18 15:48:39,523 INFO org.apache.hadoop.hdfs.server.blockmanagement.BlockReportLeaseManager: Registered DN daafd206-fdfe-44cc-a1fc-8ac1279c5cda (192.168.10.248:9866).
2022-03-18 15:48:39,889 INFO org.apache.hadoop.hdfs.server.blockmanagement.DatanodeDescriptor: Adding new storage ID DS-6dd0b7dc-1fd0-488c-924b-76de306ac2cb for DN 192.168.10.248:9866
2022-03-18 15:48:40,062 INFO BlockStateChange: BLOCK* processReport 0xf15bae747aec7666: Processing first storage report for DS-6dd0b7dc-1fd0-488c-924b-76de306ac2cb from datanode daafd206-fdfe-44cc-a1fc-8ac1279c5cda
2022-03-18 15:48:40,065 INFO BlockStateChange: BLOCK* processReport 0xf15bae747aec7666: from storage DS-6dd0b7dc-1fd0-488c-924b-76de306ac2cb node DatanodeRegistration(192.168.10.248:9866, datanodeUuid=daafd206-fdfe-44cc-a1fc-8ac1279c5cda, infoPort=9864, infoSecurePort=0, ipcPort=9867, storageInfo=lv=-57;cid=CID-f921bab0-7c73-44ef-bc61-ea81d176ec82;nsid=311459717;c=1647534325420), blocks: 0, hasStaleStorage: false, processing time: 3 msecs, invalidatedBlocks: 0
2022-03-18 15:49:44,972 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: Roll Edit Log from 192.168.10.248
2022-03-18 15:49:44,972 INFO org.apache.hadoop.hdfs.server.namenode.FSEditLog: Rolling edit logs
2022-03-18 15:49:44,973 INFO org.apache.hadoop.hdfs.server.namenode.FSEditLog: Ending log segment 85, 85
2022-03-18 15:49:44,973 INFO org.apache.hadoop.hdfs.server.namenode.FSEditLog: Number of transactions: 2 Total time for transactions(ms): 2 Number of transactions batched in Syncs: 84 Number of syncs: 2 SyncTimes(ms): 130
2022-03-18 15:49:44,988 INFO org.apache.hadoop.hdfs.server.namenode.FSEditLog: Number of transactions: 2 Total time for transactions(ms): 2 Number of transactions batched in Syncs: 84 Number of syncs: 3 SyncTimes(ms): 144
2022-03-18 15:49:44,990 INFO org.apache.hadoop.hdfs.server.namenode.FileJournalManager: Finalizing edits file /home/hadoop_data/dfs/name/current/edits_inprogress_0000000000000000085 -> /home/hadoop_data/dfs/name/current/edits_0000000000000000085-0000000000000000086
2022-03-18 15:49:44,992 INFO org.apache.hadoop.hdfs.server.namenode.FSEditLog: Starting log segment at 87
2022-03-18 15:49:45,514 INFO org.apache.hadoop.hdfs.server.namenode.TransferFsImage: Sending fileName: /home/hadoop_data/dfs/name/current/fsimage_0000000000000000083, fileSize: 533. Sent total: 533 bytes. Size of last segment intended to send: -1 bytes.
2022-03-18 15:49:45,641 INFO org.apache.hadoop.hdfs.server.namenode.TransferFsImage: Sending fileName: /home/hadoop_data/dfs/name/current/edits_0000000000000000084-0000000000000000084, fileSize: 1048576. Sent total: 1048576 bytes. Size of last segment intended to send: -1 bytes.
2022-03-18 15:49:45,744 INFO org.apache.hadoop.hdfs.server.namenode.TransferFsImage: Sending fileName: /home/hadoop_data/dfs/name/current/edits_0000000000000000085-0000000000000000086, fileSize: 42. Sent total: 42 bytes. Size of last segment intended to send: -1 bytes.
2022-03-18 15:49:46,668 INFO org.apache.hadoop.hdfs.server.common.Util: Combined time for file download and fsync to all disks took 0.00s. The file download took 0.00s at 0.00 KB/s. Synchronous (fsync) write to disk of /home/hadoop_data/dfs/name/current/fsimage.ckpt_0000000000000000086 took 0.00s.
2022-03-18 15:49:46,668 INFO org.apache.hadoop.hdfs.server.namenode.TransferFsImage: Downloaded file fsimage.ckpt_0000000000000000086 size 533 bytes.
2022-03-18 15:49:46,684 INFO org.apache.hadoop.hdfs.server.namenode.NNStorageRetentionManager: Going to retain 2 images with txid >= 83
2022-03-18 15:49:46,684 INFO org.apache.hadoop.hdfs.server.namenode.NNStorageRetentionManager: Purging old image FSImageFile(file=/home/hadoop_data/dfs/name/current/fsimage_0000000000000000081, cpktTxId=0000000000000000081)

這就是namenode啟動成功,如查格式化兩次就會出現(xiàn)datanode啟動不成功,這是clusterID兩次不致造成的,可以進入

-rw-rw-r–. 1 hadoop hadoop 229 Mar 18 15:48 VERSION
drwx——. 4 hadoop hadoop 54 Mar 18 15:48 BP-301391941-192.168.10.248-1647534325420
[root@hadoop current]# cat VERSION
#Fri Mar 18 15:48:38 CST 2022
storageID=DS-6dd0b7dc-1fd0-488c-924b-76de306ac2cb
clusterID=CID-f921bab0-7c73-44ef-bc61-ea81d176ec82
cTime=0
datanodeUuid=daafd206-fdfe-44cc-a1fc-8ac1279c5cda
storageType=DATA_NODE
layoutVersion=-57
[root@hadoop current]# pwd
/home/hadoop_data/dfs/data/current
修改clusterID和namenode節(jié)點的clusterID一樣后,在重啟hadoop服務

現(xiàn)在偽分布式hadoop集群已經(jīng)部署成功了,如果啟動hadoop的時候遇到了問題,可以查看對應的log文件查看是由什么問題引起的。一般的問題如,未設置JAVA_HOME hadoopdata目錄不存在,或者無權(quán)限等等。

現(xiàn)要在可以進入hadoop組件hdfs的UI界面:

kb3189866

現(xiàn)要在可以進入hadoop組件yarn的UI界面:

kb3189866

可能安裝過成會遇到各樣的問題,可是查看日志和搜索或是去官網(wǎng)站都可以找到解決的**,我只是把做的過程記錄出來了,以備后需。

拓展知識:

kb3189866

有的機器升級不僅僅一次不成功,有時候反復升級都是這樣,這樣的情況我在升級補丁的時候也遇到過!比如:升級W10周年版本的14393(kb3189866)的時候更新到45%就卡住了,沒辦法進一步的往下進行,最后還是在論壇里找到升級的下載包解決了!

前沿拓展:

kb3189866

下載 KB3189866 **更新包,試試!


我用的是VM虛擬機,**作系統(tǒng)是RedHat7.9的系統(tǒng)進行JDK和Hadoop的安裝實施,

本過程只是作測試和學習參考用。

1、添加hadoop新用戶

useradd -m hadoop -s /bin/bash # 添加hadoop用戶

passwd hadoop # 配置hadoop用戶的密碼

vi /etc/sudoers #編輯配置文件 在root后一行加入 hadoop ALL=(ALL) ALL ,為hadoop添加管理員權(quán)限

2、配置免密登錄(root)用戶**作

ssh-keygen -t rsa # 會有提示,都按回車就OK

cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys # 加入授權(quán)

chmod 0600 ~/.ssh/authorized_keys #添加權(quán)限

配置完成后,執(zhí)行ssh hadoop(主機名)命令可以不用輸入密碼即可登錄為配置成功。

如查發(fā)現(xiàn)生成ssh-keygen報錯,這是沒有安裝openssh造成的,用yum安裝即可。

[root@hadoop dfs]# rpm -qa |grep openssh
openssh-server-7.4p1-21.el7.x86_64
openssh-clients-7.4p1-21.el7.x86_64
openssh-7.4p1-21.el7.x86_64

3、配置JDK環(huán)境

下載JDK的安裝包之后,將jdk安裝到/usr/local/jdk 這個目錄。

tar -zxvf /home/hadoop/download/jdk-8u212-linux-x64.tar.gz -C /usr/local/jdk/

添加環(huán)境變量

vi /etc/profile # 打開環(huán)境變量配置文件,添加下面的配置

# java環(huán)境變量配置

export JAVA_HOME=/usr/local/jdk

export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH

# 配置完成后 執(zhí)行下面命令是配置生效

source /etc/profile

順便把HADOOP_HOME的環(huán)境變量也一起添加了

# hadoop環(huán)境變量配置

export HADOOP_HOME=/usr/local/hadoop

export PATH=$HADOOP_HOME/bin:$JAVA_HOME/**in:$PATH

[root@hadoop download]# cat /etc/profile
unset i
unset -f pathmunge
export JAVA_HOME=/usr/local/jdk/jdk1.8.0_212
export PATH=$JAVA_HOME/bin:$PATH
export HADOOP_HOME=/usr/local/hadoop/hadoop-3.1.3
export PATH=$HADOOP_HOME/bin:$PATH
export PATH=$HADOOP_HOME/**in:$PATH

java環(huán)境是否配置成功,我們執(zhí)行java -version 可以看到java相關(guān)的信息

[root@hadoop download]# java -version
java version "1.8.0_212"
Java(TM) SE Runtime Environment (build 1.8.0_212-b10)
Java HotSpot(TM) 64-Bit Server VM (build 25.212-b10, mixed mode)

4、安裝配置Hadoop

Hadoop NameNode格式化及運行測試,接下來對hadoop進行一些配置,使其能以偽分布式的方式運行。進入到hadoop的配置文件所在的目錄

cd /usr/local/hadoop/etc/hadoop配置hadoop-env.sh

在該文件內(nèi)配置JAVA_HOME 所示:

vi /usr/local/hadoop/hadoop-3.1.3/etc/hadoop/hadoop-env.sh
###
# Generic settings for HADOOP
###

# Technically, the only required environment variable is JAVA_HOME.
# All others are optional. However, the defaults are probably not
# preferred. Many sites configure these options outside of Hadoop,
# such as in /etc/profile.d

# The java implementation to use. By default, this environment
# variable is REQUIRED on ALL platforms except OS X!
export JAVA_HOME=/usr/local/jdk/jdk1.8.0_212

# Location of Hadoop. By default, Hadoop will attempt to determine
# this location based upon its execution path.
export HADOOP_HOME=/usr/local/hadoop/hadoop-3.1.3

JAVA_HOME設置為我們自己的jdk安裝路徑即可

1、配置hdfs-site.xml

hdfs-site.xml的內(nèi)容改成下面的配置。

<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>file:/home/hadoop_data/dfs/name</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/home/hadoop_data/dfs/data</value>
</property>
</configuration>dfs.replication # 為文件保存副本的數(shù)量
dfs.namenode.name.dir # 為hadoop namenode數(shù)據(jù)目錄,改成自己需要的目錄(不存在需新建)
dfs.datanode.data.dir # 為hadoop datanode數(shù)據(jù)目錄,改成自己需要的目錄(不存在需新建)

1、配置core-site.xml

core-site.xml的內(nèi)容改成下面的配置。

<configuration>
<property>
<name>hadoop.tmp.dir</name>
<value>file:/home/hadoop_data</value>
</property>
<property>
<name>fs.defaultFS</name>
<value>hdfs://hadoop:9000</value>
</property>
</configuration>hadoop.tmp.dir # hadoop 緩存目錄,更改為自己的目錄(不存在需創(chuàng)建)
fs.defaultFS # hadoop fs **端口配置
mkdir /home/hadoop_data/dfs/name
mkdir /home/hadoop_data/dfs/data
cd /home/hadoop_data/
chown -R hadoop:hadoop dfs && chmod -R 777 dfs

如果只需要HDFS,配置就完成,如果需要用到Y(jié)arn,還需要做yarn相關(guān)的配置。

1、配置mapred-site.xml

mapred-site.xml的內(nèi)容改成下面的配置。

<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
</configuration>

1、配置yarn-site.xml

yarn-site.xml的內(nèi)容改成下面的配置。

<configuration>
<!– Site specific YARN configuration properties –>
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
</configuration>

Hadoop格式化及啟動

現(xiàn)在hadoop基礎配置已經(jīng)完成了,需要對Hadoop的namenode進行格式化,第二啟動hadoop dfs服務。

1、NameNode格式化我們跳轉(zhuǎn)到hadoop的bin目錄,并執(zhí)行格式化命令

cd /usr/local/hadoop/bin
./hdfs namenode -format

執(zhí)行結(jié)果如下圖所示,當exit status 為0時,則為格式化成功。

此時我們的hadoop已經(jīng)格式化成功了,接下來我們?nèi)游覀僪adoop。

進到hadoop下的**in目錄

cd /usr/local/hadoop/**in
./start-dfs.sh # 啟動HDFS
./start-yarn.sh # 啟動YARN

執(zhí)行./start-dfs.sh 如下圖所示:

[hadoop@hadoop ~]$ stop-dfs.sh
Stopping namenodes on [hadoop]
Stopping datanodes
Stopping secondary namenodes [hadoop]
[hadoop@hadoop ~]$ start-dfs.sh
Starting namenodes on [hadoop]
Starting datanodes
Starting secondary namenodes [hadoop]
[hadoop@hadoop ~]$ jps
48336 Jps
48002 DataNode
48210 SecondaryNameNode
46725 NodeManager
46621 ResourceManager
47886 NameNode
[hadoop@hadoop ~]$

還可以看日志看是不啟動報錯

[hadoop@hadoop logs]$ ls -rlt
total 2528
-rw-rw-r–. 1 hadoop hadoop 0 Mar 17 23:15 SecurityAuth-hadoop.audit
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 09:37 hadoop-hadoop-datanode-hadoop.out.5
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 09:38 hadoop-hadoop-secondarynamenode-hadoop.out.5
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:04 hadoop-hadoop-namenode-hadoop.out.5
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:04 hadoop-hadoop-datanode-hadoop.out.4
-rw-rw-r–. 1 hadoop hadoop 4124 Mar 18 10:05 hadoop-hadoop-secondarynamenode-hadoop.out.4
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:06 hadoop-hadoop-namenode-hadoop.out.4
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:06 hadoop-hadoop-datanode-hadoop.out.3
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:31 hadoop-hadoop-namenode-hadoop.out.3
-rw-rw-r–. 1 hadoop hadoop 121390 Mar 18 10:50 hadoop-hadoop-secondarynamenode-hadoop.out.3
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:51 hadoop-hadoop-namenode-hadoop.out.2
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:52 hadoop-hadoop-datanode-hadoop.out.2
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:52 hadoop-hadoop-secondarynamenode-hadoop.out.2
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:53 hadoop-hadoop-datanode-hadoop.out.1
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:54 hadoop-hadoop-secondarynamenode-hadoop.out.1
-rw-rw-r–. 1 hadoop hadoop 6151 Mar 18 10:55 hadoop-hadoop-namenode-hadoop.out.1
-rw-rw-r–. 1 hadoop hadoop 2215 Mar 18 14:42 hadoop-hadoop-resourcemanager-hadoop.out
-rw-rw-r–. 1 hadoop hadoop 2199 Mar 18 14:43 hadoop-hadoop-nodemanager-hadoop.out
-rw-rw-r–. 1 hadoop hadoop 41972 Mar 18 14:52 hadoop-hadoop-resourcemanager-hadoop.log
-rw-rw-r–. 1 hadoop hadoop 37935 Mar 18 15:42 hadoop-hadoop-nodemanager-hadoop.log
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 15:48 hadoop-hadoop-namenode-hadoop.out
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 15:48 hadoop-hadoop-datanode-hadoop.out
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 15:48 hadoop-hadoop-secondarynamenode-hadoop.out
-rw-rw-r–. 1 hadoop hadoop 970190 Mar 18 15:48 hadoop-hadoop-datanode-hadoop.log
drwxr-xr-x. 2 hadoop hadoop 6 Mar 18 15:48 userlogs
-rw-rw-r–. 1 hadoop hadoop 572169 Mar 18 15:49 hadoop-hadoop-namenode-hadoop.log
-rw-rw-r–. 1 hadoop hadoop 656741 Mar 18 15:49 hadoop-hadoop-secondarynamenode-hadoop.log
[hadoop@hadoop logs]$ pwd
/usr/local/hadoop/hadoop-3.1.3/logs
[hadoop@hadoop logs]$ tail -20f hadoop-hadoop-namenode-hadoop.log
2022-03-18 15:48:39,521 INFO org.apache.hadoop.hdfs.StateChange: BLOCK* registerDatanode: from DatanodeRegistration(192.168.10.248:9866, datanodeUuid=daafd206-fdfe-44cc-a1fc-8ac1279c5cda, infoPort=9864, infoSecurePort=0, ipcPort=9867, storageInfo=lv=-57;cid=CID-f921bab0-7c73-44ef-bc61-ea81d176ec82;nsid=311459717;c=1647534325420) storage daafd206-fdfe-44cc-a1fc-8ac1279c5cda
2022-03-18 15:48:39,523 INFO org.apache.hadoop.net.NetworkTopology: Adding a new node: /default-rack/192.168.10.248:9866
2022-03-18 15:48:39,523 INFO org.apache.hadoop.hdfs.server.blockmanagement.BlockReportLeaseManager: Registered DN daafd206-fdfe-44cc-a1fc-8ac1279c5cda (192.168.10.248:9866).
2022-03-18 15:48:39,889 INFO org.apache.hadoop.hdfs.server.blockmanagement.DatanodeDescriptor: Adding new storage ID DS-6dd0b7dc-1fd0-488c-924b-76de306ac2cb for DN 192.168.10.248:9866
2022-03-18 15:48:40,062 INFO BlockStateChange: BLOCK* processReport 0xf15bae747aec7666: Processing first storage report for DS-6dd0b7dc-1fd0-488c-924b-76de306ac2cb from datanode daafd206-fdfe-44cc-a1fc-8ac1279c5cda
2022-03-18 15:48:40,065 INFO BlockStateChange: BLOCK* processReport 0xf15bae747aec7666: from storage DS-6dd0b7dc-1fd0-488c-924b-76de306ac2cb node DatanodeRegistration(192.168.10.248:9866, datanodeUuid=daafd206-fdfe-44cc-a1fc-8ac1279c5cda, infoPort=9864, infoSecurePort=0, ipcPort=9867, storageInfo=lv=-57;cid=CID-f921bab0-7c73-44ef-bc61-ea81d176ec82;nsid=311459717;c=1647534325420), blocks: 0, hasStaleStorage: false, processing time: 3 msecs, invalidatedBlocks: 0
2022-03-18 15:49:44,972 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: Roll Edit Log from 192.168.10.248
2022-03-18 15:49:44,972 INFO org.apache.hadoop.hdfs.server.namenode.FSEditLog: Rolling edit logs
2022-03-18 15:49:44,973 INFO org.apache.hadoop.hdfs.server.namenode.FSEditLog: Ending log segment 85, 85
2022-03-18 15:49:44,973 INFO org.apache.hadoop.hdfs.server.namenode.FSEditLog: Number of transactions: 2 Total time for transactions(ms): 2 Number of transactions batched in Syncs: 84 Number of syncs: 2 SyncTimes(ms): 130
2022-03-18 15:49:44,988 INFO org.apache.hadoop.hdfs.server.namenode.FSEditLog: Number of transactions: 2 Total time for transactions(ms): 2 Number of transactions batched in Syncs: 84 Number of syncs: 3 SyncTimes(ms): 144
2022-03-18 15:49:44,990 INFO org.apache.hadoop.hdfs.server.namenode.FileJournalManager: Finalizing edits file /home/hadoop_data/dfs/name/current/edits_inprogress_0000000000000000085 -> /home/hadoop_data/dfs/name/current/edits_0000000000000000085-0000000000000000086
2022-03-18 15:49:44,992 INFO org.apache.hadoop.hdfs.server.namenode.FSEditLog: Starting log segment at 87
2022-03-18 15:49:45,514 INFO org.apache.hadoop.hdfs.server.namenode.TransferFsImage: Sending fileName: /home/hadoop_data/dfs/name/current/fsimage_0000000000000000083, fileSize: 533. Sent total: 533 bytes. Size of last segment intended to send: -1 bytes.
2022-03-18 15:49:45,641 INFO org.apache.hadoop.hdfs.server.namenode.TransferFsImage: Sending fileName: /home/hadoop_data/dfs/name/current/edits_0000000000000000084-0000000000000000084, fileSize: 1048576. Sent total: 1048576 bytes. Size of last segment intended to send: -1 bytes.
2022-03-18 15:49:45,744 INFO org.apache.hadoop.hdfs.server.namenode.TransferFsImage: Sending fileName: /home/hadoop_data/dfs/name/current/edits_0000000000000000085-0000000000000000086, fileSize: 42. Sent total: 42 bytes. Size of last segment intended to send: -1 bytes.
2022-03-18 15:49:46,668 INFO org.apache.hadoop.hdfs.server.common.Util: Combined time for file download and fsync to all disks took 0.00s. The file download took 0.00s at 0.00 KB/s. Synchronous (fsync) write to disk of /home/hadoop_data/dfs/name/current/fsimage.ckpt_0000000000000000086 took 0.00s.
2022-03-18 15:49:46,668 INFO org.apache.hadoop.hdfs.server.namenode.TransferFsImage: Downloaded file fsimage.ckpt_0000000000000000086 size 533 bytes.
2022-03-18 15:49:46,684 INFO org.apache.hadoop.hdfs.server.namenode.NNStorageRetentionManager: Going to retain 2 images with txid >= 83
2022-03-18 15:49:46,684 INFO org.apache.hadoop.hdfs.server.namenode.NNStorageRetentionManager: Purging old image FSImageFile(file=/home/hadoop_data/dfs/name/current/fsimage_0000000000000000081, cpktTxId=0000000000000000081)

這就是namenode啟動成功,如查格式化兩次就會出現(xiàn)datanode啟動不成功,這是clusterID兩次不致造成的,可以進入

-rw-rw-r–. 1 hadoop hadoop 229 Mar 18 15:48 VERSION
drwx——. 4 hadoop hadoop 54 Mar 18 15:48 BP-301391941-192.168.10.248-1647534325420
[root@hadoop current]# cat VERSION
#Fri Mar 18 15:48:38 CST 2022
storageID=DS-6dd0b7dc-1fd0-488c-924b-76de306ac2cb
clusterID=CID-f921bab0-7c73-44ef-bc61-ea81d176ec82
cTime=0
datanodeUuid=daafd206-fdfe-44cc-a1fc-8ac1279c5cda
storageType=DATA_NODE
layoutVersion=-57
[root@hadoop current]# pwd
/home/hadoop_data/dfs/data/current
修改clusterID和namenode節(jié)點的clusterID一樣后,在重啟hadoop服務

現(xiàn)在偽分布式hadoop集群已經(jīng)部署成功了,如果啟動hadoop的時候遇到了問題,可以查看對應的log文件查看是由什么問題引起的。一般的問題如,未設置JAVA_HOME hadoopdata目錄不存在,或者無權(quán)限等等。

現(xiàn)要在可以進入hadoop組件hdfs的UI界面:

kb3189866

現(xiàn)要在可以進入hadoop組件yarn的UI界面:

kb3189866

可能安裝過成會遇到各樣的問題,可是查看日志和搜索或是去官網(wǎng)站都可以找到解決的**,我只是把做的過程記錄出來了,以備后需。

拓展知識:

kb3189866

有的機器升級不僅僅一次不成功,有時候反復升級都是這樣,這樣的情況我在升級補丁的時候也遇到過!比如:升級W10周年版本的14393(kb3189866)的時候更新到45%就卡住了,沒辦法進一步的往下進行,最后還是在論壇里找到升級的下載包解決了!

前沿拓展:

kb3189866

下載 KB3189866 **更新包,試試!


我用的是VM虛擬機,**作系統(tǒng)是RedHat7.9的系統(tǒng)進行JDK和Hadoop的安裝實施,

本過程只是作測試和學習參考用。

1、添加hadoop新用戶

useradd -m hadoop -s /bin/bash # 添加hadoop用戶

passwd hadoop # 配置hadoop用戶的密碼

vi /etc/sudoers #編輯配置文件 在root后一行加入 hadoop ALL=(ALL) ALL ,為hadoop添加管理員權(quán)限

2、配置免密登錄(root)用戶**作

ssh-keygen -t rsa # 會有提示,都按回車就OK

cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys # 加入授權(quán)

chmod 0600 ~/.ssh/authorized_keys #添加權(quán)限

配置完成后,執(zhí)行ssh hadoop(主機名)命令可以不用輸入密碼即可登錄為配置成功。

如查發(fā)現(xiàn)生成ssh-keygen報錯,這是沒有安裝openssh造成的,用yum安裝即可。

[root@hadoop dfs]# rpm -qa |grep openssh
openssh-server-7.4p1-21.el7.x86_64
openssh-clients-7.4p1-21.el7.x86_64
openssh-7.4p1-21.el7.x86_64

3、配置JDK環(huán)境

下載JDK的安裝包之后,將jdk安裝到/usr/local/jdk 這個目錄。

tar -zxvf /home/hadoop/download/jdk-8u212-linux-x64.tar.gz -C /usr/local/jdk/

添加環(huán)境變量

vi /etc/profile # 打開環(huán)境變量配置文件,添加下面的配置

# java環(huán)境變量配置

export JAVA_HOME=/usr/local/jdk

export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH

# 配置完成后 執(zhí)行下面命令是配置生效

source /etc/profile

順便把HADOOP_HOME的環(huán)境變量也一起添加了

# hadoop環(huán)境變量配置

export HADOOP_HOME=/usr/local/hadoop

export PATH=$HADOOP_HOME/bin:$JAVA_HOME/**in:$PATH

[root@hadoop download]# cat /etc/profile
unset i
unset -f pathmunge
export JAVA_HOME=/usr/local/jdk/jdk1.8.0_212
export PATH=$JAVA_HOME/bin:$PATH
export HADOOP_HOME=/usr/local/hadoop/hadoop-3.1.3
export PATH=$HADOOP_HOME/bin:$PATH
export PATH=$HADOOP_HOME/**in:$PATH

java環(huán)境是否配置成功,我們執(zhí)行java -version 可以看到java相關(guān)的信息

[root@hadoop download]# java -version
java version "1.8.0_212"
Java(TM) SE Runtime Environment (build 1.8.0_212-b10)
Java HotSpot(TM) 64-Bit Server VM (build 25.212-b10, mixed mode)

4、安裝配置Hadoop

Hadoop NameNode格式化及運行測試,接下來對hadoop進行一些配置,使其能以偽分布式的方式運行。進入到hadoop的配置文件所在的目錄

cd /usr/local/hadoop/etc/hadoop配置hadoop-env.sh

在該文件內(nèi)配置JAVA_HOME 所示:

vi /usr/local/hadoop/hadoop-3.1.3/etc/hadoop/hadoop-env.sh
###
# Generic settings for HADOOP
###

# Technically, the only required environment variable is JAVA_HOME.
# All others are optional. However, the defaults are probably not
# preferred. Many sites configure these options outside of Hadoop,
# such as in /etc/profile.d

# The java implementation to use. By default, this environment
# variable is REQUIRED on ALL platforms except OS X!
export JAVA_HOME=/usr/local/jdk/jdk1.8.0_212

# Location of Hadoop. By default, Hadoop will attempt to determine
# this location based upon its execution path.
export HADOOP_HOME=/usr/local/hadoop/hadoop-3.1.3

JAVA_HOME設置為我們自己的jdk安裝路徑即可

1、配置hdfs-site.xml

hdfs-site.xml的內(nèi)容改成下面的配置。

<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>file:/home/hadoop_data/dfs/name</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/home/hadoop_data/dfs/data</value>
</property>
</configuration>dfs.replication # 為文件保存副本的數(shù)量
dfs.namenode.name.dir # 為hadoop namenode數(shù)據(jù)目錄,改成自己需要的目錄(不存在需新建)
dfs.datanode.data.dir # 為hadoop datanode數(shù)據(jù)目錄,改成自己需要的目錄(不存在需新建)

1、配置core-site.xml

core-site.xml的內(nèi)容改成下面的配置。

<configuration>
<property>
<name>hadoop.tmp.dir</name>
<value>file:/home/hadoop_data</value>
</property>
<property>
<name>fs.defaultFS</name>
<value>hdfs://hadoop:9000</value>
</property>
</configuration>hadoop.tmp.dir # hadoop 緩存目錄,更改為自己的目錄(不存在需創(chuàng)建)
fs.defaultFS # hadoop fs **端口配置
mkdir /home/hadoop_data/dfs/name
mkdir /home/hadoop_data/dfs/data
cd /home/hadoop_data/
chown -R hadoop:hadoop dfs && chmod -R 777 dfs

如果只需要HDFS,配置就完成,如果需要用到Y(jié)arn,還需要做yarn相關(guān)的配置。

1、配置mapred-site.xml

mapred-site.xml的內(nèi)容改成下面的配置。

<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
</configuration>

1、配置yarn-site.xml

yarn-site.xml的內(nèi)容改成下面的配置。

<configuration>
<!– Site specific YARN configuration properties –>
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
</configuration>

Hadoop格式化及啟動

現(xiàn)在hadoop基礎配置已經(jīng)完成了,需要對Hadoop的namenode進行格式化,第二啟動hadoop dfs服務。

1、NameNode格式化我們跳轉(zhuǎn)到hadoop的bin目錄,并執(zhí)行格式化命令

cd /usr/local/hadoop/bin
./hdfs namenode -format

執(zhí)行結(jié)果如下圖所示,當exit status 為0時,則為格式化成功。

此時我們的hadoop已經(jīng)格式化成功了,接下來我們?nèi)游覀僪adoop。

進到hadoop下的**in目錄

cd /usr/local/hadoop/**in
./start-dfs.sh # 啟動HDFS
./start-yarn.sh # 啟動YARN

執(zhí)行./start-dfs.sh 如下圖所示:

[hadoop@hadoop ~]$ stop-dfs.sh
Stopping namenodes on [hadoop]
Stopping datanodes
Stopping secondary namenodes [hadoop]
[hadoop@hadoop ~]$ start-dfs.sh
Starting namenodes on [hadoop]
Starting datanodes
Starting secondary namenodes [hadoop]
[hadoop@hadoop ~]$ jps
48336 Jps
48002 DataNode
48210 SecondaryNameNode
46725 NodeManager
46621 ResourceManager
47886 NameNode
[hadoop@hadoop ~]$

還可以看日志看是不啟動報錯

[hadoop@hadoop logs]$ ls -rlt
total 2528
-rw-rw-r–. 1 hadoop hadoop 0 Mar 17 23:15 SecurityAuth-hadoop.audit
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 09:37 hadoop-hadoop-datanode-hadoop.out.5
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 09:38 hadoop-hadoop-secondarynamenode-hadoop.out.5
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:04 hadoop-hadoop-namenode-hadoop.out.5
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:04 hadoop-hadoop-datanode-hadoop.out.4
-rw-rw-r–. 1 hadoop hadoop 4124 Mar 18 10:05 hadoop-hadoop-secondarynamenode-hadoop.out.4
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:06 hadoop-hadoop-namenode-hadoop.out.4
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:06 hadoop-hadoop-datanode-hadoop.out.3
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:31 hadoop-hadoop-namenode-hadoop.out.3
-rw-rw-r–. 1 hadoop hadoop 121390 Mar 18 10:50 hadoop-hadoop-secondarynamenode-hadoop.out.3
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:51 hadoop-hadoop-namenode-hadoop.out.2
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:52 hadoop-hadoop-datanode-hadoop.out.2
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:52 hadoop-hadoop-secondarynamenode-hadoop.out.2
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:53 hadoop-hadoop-datanode-hadoop.out.1
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 10:54 hadoop-hadoop-secondarynamenode-hadoop.out.1
-rw-rw-r–. 1 hadoop hadoop 6151 Mar 18 10:55 hadoop-hadoop-namenode-hadoop.out.1
-rw-rw-r–. 1 hadoop hadoop 2215 Mar 18 14:42 hadoop-hadoop-resourcemanager-hadoop.out
-rw-rw-r–. 1 hadoop hadoop 2199 Mar 18 14:43 hadoop-hadoop-nodemanager-hadoop.out
-rw-rw-r–. 1 hadoop hadoop 41972 Mar 18 14:52 hadoop-hadoop-resourcemanager-hadoop.log
-rw-rw-r–. 1 hadoop hadoop 37935 Mar 18 15:42 hadoop-hadoop-nodemanager-hadoop.log
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 15:48 hadoop-hadoop-namenode-hadoop.out
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 15:48 hadoop-hadoop-datanode-hadoop.out
-rw-rw-r–. 1 hadoop hadoop 690 Mar 18 15:48 hadoop-hadoop-secondarynamenode-hadoop.out
-rw-rw-r–. 1 hadoop hadoop 970190 Mar 18 15:48 hadoop-hadoop-datanode-hadoop.log
drwxr-xr-x. 2 hadoop hadoop 6 Mar 18 15:48 userlogs
-rw-rw-r–. 1 hadoop hadoop 572169 Mar 18 15:49 hadoop-hadoop-namenode-hadoop.log
-rw-rw-r–. 1 hadoop hadoop 656741 Mar 18 15:49 hadoop-hadoop-secondarynamenode-hadoop.log
[hadoop@hadoop logs]$ pwd
/usr/local/hadoop/hadoop-3.1.3/logs
[hadoop@hadoop logs]$ tail -20f hadoop-hadoop-namenode-hadoop.log
2022-03-18 15:48:39,521 INFO org.apache.hadoop.hdfs.StateChange: BLOCK* registerDatanode: from DatanodeRegistration(192.168.10.248:9866, datanodeUuid=daafd206-fdfe-44cc-a1fc-8ac1279c5cda, infoPort=9864, infoSecurePort=0, ipcPort=9867, storageInfo=lv=-57;cid=CID-f921bab0-7c73-44ef-bc61-ea81d176ec82;nsid=311459717;c=1647534325420) storage daafd206-fdfe-44cc-a1fc-8ac1279c5cda
2022-03-18 15:48:39,523 INFO org.apache.hadoop.net.NetworkTopology: Adding a new node: /default-rack/192.168.10.248:9866
2022-03-18 15:48:39,523 INFO org.apache.hadoop.hdfs.server.blockmanagement.BlockReportLeaseManager: Registered DN daafd206-fdfe-44cc-a1fc-8ac1279c5cda (192.168.10.248:9866).
2022-03-18 15:48:39,889 INFO org.apache.hadoop.hdfs.server.blockmanagement.DatanodeDescriptor: Adding new storage ID DS-6dd0b7dc-1fd0-488c-924b-76de306ac2cb for DN 192.168.10.248:9866
2022-03-18 15:48:40,062 INFO BlockStateChange: BLOCK* processReport 0xf15bae747aec7666: Processing first storage report for DS-6dd0b7dc-1fd0-488c-924b-76de306ac2cb from datanode daafd206-fdfe-44cc-a1fc-8ac1279c5cda
2022-03-18 15:48:40,065 INFO BlockStateChange: BLOCK* processReport 0xf15bae747aec7666: from storage DS-6dd0b7dc-1fd0-488c-924b-76de306ac2cb node DatanodeRegistration(192.168.10.248:9866, datanodeUuid=daafd206-fdfe-44cc-a1fc-8ac1279c5cda, infoPort=9864, infoSecurePort=0, ipcPort=9867, storageInfo=lv=-57;cid=CID-f921bab0-7c73-44ef-bc61-ea81d176ec82;nsid=311459717;c=1647534325420), blocks: 0, hasStaleStorage: false, processing time: 3 msecs, invalidatedBlocks: 0
2022-03-18 15:49:44,972 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: Roll Edit Log from 192.168.10.248
2022-03-18 15:49:44,972 INFO org.apache.hadoop.hdfs.server.namenode.FSEditLog: Rolling edit logs
2022-03-18 15:49:44,973 INFO org.apache.hadoop.hdfs.server.namenode.FSEditLog: Ending log segment 85, 85
2022-03-18 15:49:44,973 INFO org.apache.hadoop.hdfs.server.namenode.FSEditLog: Number of transactions: 2 Total time for transactions(ms): 2 Number of transactions batched in Syncs: 84 Number of syncs: 2 SyncTimes(ms): 130
2022-03-18 15:49:44,988 INFO org.apache.hadoop.hdfs.server.namenode.FSEditLog: Number of transactions: 2 Total time for transactions(ms): 2 Number of transactions batched in Syncs: 84 Number of syncs: 3 SyncTimes(ms): 144
2022-03-18 15:49:44,990 INFO org.apache.hadoop.hdfs.server.namenode.FileJournalManager: Finalizing edits file /home/hadoop_data/dfs/name/current/edits_inprogress_0000000000000000085 -> /home/hadoop_data/dfs/name/current/edits_0000000000000000085-0000000000000000086
2022-03-18 15:49:44,992 INFO org.apache.hadoop.hdfs.server.namenode.FSEditLog: Starting log segment at 87
2022-03-18 15:49:45,514 INFO org.apache.hadoop.hdfs.server.namenode.TransferFsImage: Sending fileName: /home/hadoop_data/dfs/name/current/fsimage_0000000000000000083, fileSize: 533. Sent total: 533 bytes. Size of last segment intended to send: -1 bytes.
2022-03-18 15:49:45,641 INFO org.apache.hadoop.hdfs.server.namenode.TransferFsImage: Sending fileName: /home/hadoop_data/dfs/name/current/edits_0000000000000000084-0000000000000000084, fileSize: 1048576. Sent total: 1048576 bytes. Size of last segment intended to send: -1 bytes.
2022-03-18 15:49:45,744 INFO org.apache.hadoop.hdfs.server.namenode.TransferFsImage: Sending fileName: /home/hadoop_data/dfs/name/current/edits_0000000000000000085-0000000000000000086, fileSize: 42. Sent total: 42 bytes. Size of last segment intended to send: -1 bytes.
2022-03-18 15:49:46,668 INFO org.apache.hadoop.hdfs.server.common.Util: Combined time for file download and fsync to all disks took 0.00s. The file download took 0.00s at 0.00 KB/s. Synchronous (fsync) write to disk of /home/hadoop_data/dfs/name/current/fsimage.ckpt_0000000000000000086 took 0.00s.
2022-03-18 15:49:46,668 INFO org.apache.hadoop.hdfs.server.namenode.TransferFsImage: Downloaded file fsimage.ckpt_0000000000000000086 size 533 bytes.
2022-03-18 15:49:46,684 INFO org.apache.hadoop.hdfs.server.namenode.NNStorageRetentionManager: Going to retain 2 images with txid >= 83
2022-03-18 15:49:46,684 INFO org.apache.hadoop.hdfs.server.namenode.NNStorageRetentionManager: Purging old image FSImageFile(file=/home/hadoop_data/dfs/name/current/fsimage_0000000000000000081, cpktTxId=0000000000000000081)

這就是namenode啟動成功,如查格式化兩次就會出現(xiàn)datanode啟動不成功,這是clusterID兩次不致造成的,可以進入

-rw-rw-r–. 1 hadoop hadoop 229 Mar 18 15:48 VERSION
drwx——. 4 hadoop hadoop 54 Mar 18 15:48 BP-301391941-192.168.10.248-1647534325420
[root@hadoop current]# cat VERSION
#Fri Mar 18 15:48:38 CST 2022
storageID=DS-6dd0b7dc-1fd0-488c-924b-76de306ac2cb
clusterID=CID-f921bab0-7c73-44ef-bc61-ea81d176ec82
cTime=0
datanodeUuid=daafd206-fdfe-44cc-a1fc-8ac1279c5cda
storageType=DATA_NODE
layoutVersion=-57
[root@hadoop current]# pwd
/home/hadoop_data/dfs/data/current
修改clusterID和namenode節(jié)點的clusterID一樣后,在重啟hadoop服務

現(xiàn)在偽分布式hadoop集群已經(jīng)部署成功了,如果啟動hadoop的時候遇到了問題,可以查看對應的log文件查看是由什么問題引起的。一般的問題如,未設置JAVA_HOME hadoopdata目錄不存在,或者無權(quán)限等等。

現(xiàn)要在可以進入hadoop組件hdfs的UI界面:

kb3189866

現(xiàn)要在可以進入hadoop組件yarn的UI界面:

kb3189866

可能安裝過成會遇到各樣的問題,可是查看日志和搜索或是去官網(wǎng)站都可以找到解決的**,我只是把做的過程記錄出來了,以備后需。

拓展知識:

kb3189866

有的機器升級不僅僅一次不成功,有時候反復升級都是這樣,這樣的情況我在升級補丁的時候也遇到過!比如:升級W10周年版本的14393(kb3189866)的時候更新到45%就卡住了,沒辦法進一步的往下進行,最后還是在論壇里找到升級的下載包解決了!

原創(chuàng)文章,作者:九賢生活小編,如若轉(zhuǎn)載,請注明出處:http://m.xiesong.cn/42372.html

国产精品成人国产乱| 久久久黄色国产| 日韩有码欧美激情| 99国产精品二区| 免费国产黄网站在线观看| 欧美日本国产| 女人被黑人抽插轮奸| 97美女国产视频| 亚洲中字无码| 国产亚洲精品AA片在线观看网站| www.涩涩.com| 粉嫩av, 久草| 久久青青女生| 久久久久九九精品影院| 日操夜夜| 巨胸喷水www久久久| AV日番成人在线| WWW国产亚洲精品久久久日本 | 人妻耻辱内射| 亚洲日韩中文乱码| 国产在线观看一区二区| 老熟女影院| 中文无码日韩欧毛久久| 九九热视频99| 亚洲中文字幕乱码无码久久| 四虎影视一区二区精品 | 色人 妻| 免费无码国产在线观| 亚洲天堂中文| 色哟哟 国产色哟哟| 超碰超碰大香蕉高潮| a人片日本亚洲| 极品粉嫩嫩模大尺度无码视频| 日韩无码久久精品| 毛片成人SUV| 七月婷婷六月丁香| SM麻豆国产网站| 国产18禁黄网站免费观看| 伊人国产女| 乱www.| 激情图区无码|