溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶(hù)服務(wù)條款》

Hadoop偽分布式安裝方法是什么

發(fā)布時(shí)間:2021-12-10 14:01:35 來(lái)源:億速云 閱讀:168 作者:iii 欄目:大數(shù)據(jù)

這篇文章主要介紹“Hadoop偽分布式安裝方法是什么”,在日常操作中,相信很多人在Hadoop偽分布式安裝方法是什么問(wèn)題上存在疑惑,小編查閱了各式資料,整理出簡(jiǎn)單好用的操作方法,希望對(duì)大家解答”Hadoop偽分布式安裝方法是什么”的疑惑有所幫助!接下來(lái),請(qǐng)跟著小編一起來(lái)學(xué)習(xí)吧!


MapReduce+Yarn
部署Yarn:
ResourceManager 
NodeManager

1.Yarn部署
[root@hadoop02 hadoop]# cp mapred-site.xml.template mapred-site.xml
[root@hadoop02 hadoop]# vi mapred-site.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
</configuration> [root@hadoop02 hadoop]# vi yarn-site.xml 
<?xml version="1.0"?>
<configuration> <!-- Site specific YARN configuration properties -->
    <property>
        <name>yarn.nodemanager.aux-services</name>
        <value>mapreduce_shuffle</value>
    </property>

</configuration>
~
[root@hadoop02 hadoop]# chown hadoop:hadoop *
[root@hadoop02 hadoop]# su - hadoop
[hadoop@hadoop02 ~]$ 
[hadoop@hadoop02 ~]$ cd /opt/software/hadoop
[hadoop@hadoop02 hadoop]$  [hadoop@hadoop02 hadoop]$ sbin/start-yarn.sh
starting yarn daemons
starting resourcemanager, logging to /opt/software/hadoop-2.8.1/logs/yarn-hadoop-resourcemanager-rzdatahadoop002.out
hadoop002: starting nodemanager, logging to /opt/software/hadoop-2.8.1/logs/yarn-hadoop-nodemanager-rzdatahadoop002.out
[hadoop@hadoop02 hadoop]$  web界面: http://192.168.137.201:8088/

2.MR Job測(cè)試
MapReduce: java代碼寫(xiě)的,map(映射)函數(shù)和reduce(歸約)函數(shù)
[hadoop@hadoop02 hadoop]$ find ./ -name "*example*"
./share/hadoop/mapreduce/lib-examples
./share/hadoop/mapreduce/hadoop-mapreduce-examples-2.8.1.jar
./share/hadoop/mapreduce/sources/hadoop-mapreduce-examples-2.8.1-sources.jar
./share/hadoop/mapreduce/sources/hadoop-mapreduce-examples-2.8.1-test-sources.jar
./lib/native/examples
./etc/hadoop/ssl-client.xml.example
./etc/hadoop/ssl-server.xml.example
[hadoop@rhadoop02 hadoop]$ 
[hadoop@hadoop02 hadoop]$ bin/hadoop jar ./share/hadoop/mapreduce/hadoop-mapreduce-examples-2.8.1.jar pi 5 10
3.停止Yarn
[hadoop@hadoop02 sbin]$ ll
total 92
-rwxr-xr-x. 1 hadoop hadoop 2752 Dec 10 11:54 distribute-exclude.sh
-rwxr-xr-x. 1 hadoop hadoop 6465 Dec 10 11:54 hadoop-daemon.sh
-rwxr-xr-x. 1 hadoop hadoop 1360 Dec 10 11:54 hadoop-daemons.sh
-rwxr-xr-x. 1 hadoop hadoop 1427 Dec 10 11:54 hdfs-config.sh
-rwxr-xr-x. 1 hadoop hadoop 2291 Dec 10 11:54 httpfs.sh
-rwxr-xr-x. 1 hadoop hadoop 3719 Dec 10 11:54 kms.sh
-rwxr-xr-x. 1 hadoop hadoop 4080 Dec 10 11:54 mr-jobhistory-daemon.sh
-rwxr-xr-x. 1 hadoop hadoop 1648 Dec 10 11:54 refresh-namenodes.sh
-rwxr-xr-x. 1 hadoop hadoop 2145 Dec 10 11:54 slaves.sh
-rwxr-xr-x. 1 hadoop hadoop 1471 Dec 10 11:54 start-all.sh
-rwxr-xr-x. 1 hadoop hadoop 1128 Dec 10 11:54 start-balancer.sh
-rwxr-xr-x. 1 hadoop hadoop 3734 Dec 10 11:54 start-dfs.sh
-rwxr-xr-x. 1 hadoop hadoop 1357 Dec 10 11:54 start-secure-dns.sh
-rwxr-xr-x. 1 hadoop hadoop 1347 Dec 10 11:54 start-yarn.sh
-rwxr-xr-x. 1 hadoop hadoop 1462 Dec 10 11:54 stop-all.sh
-rwxr-xr-x. 1 hadoop hadoop 1179 Dec 10 11:54 stop-balancer.sh
-rwxr-xr-x. 1 hadoop hadoop 3206 Dec 10 11:54 stop-dfs.sh
-rwxr-xr-x. 1 hadoop hadoop 1340 Dec 10 11:54 stop-secure-dns.sh
-rwxr-xr-x. 1 hadoop hadoop 1340 Dec 10 11:54 stop-yarn.sh
-rwxr-xr-x. 1 hadoop hadoop 4295 Dec 10 11:54 yarn-daemon.sh
-rwxr-xr-x. 1 hadoop hadoop 1353 Dec 10 11:54 yarn-daemons.sh
[hadoop@hadoop02 sbin]$ 

到此,關(guān)于“Hadoop偽分布式安裝方法是什么”的學(xué)習(xí)就結(jié)束了,希望能夠解決大家的疑惑。理論與實(shí)踐的搭配能更好的幫助大家學(xué)習(xí),快去試試吧!若想繼續(xù)學(xué)習(xí)更多相關(guān)知識(shí),請(qǐng)繼續(xù)關(guān)注億速云網(wǎng)站,小編會(huì)繼續(xù)努力為大家?guī)?lái)更多實(shí)用的文章!

向AI問(wèn)一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀(guān)點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI