Hadoop偽分散式安裝(MapReduce+Yarn)
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測試
MapReduce: java程式碼寫的,map(對映)函式和reduce(歸約)函式
[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]$
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31496956/viewspace-2148957/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- hadoop偽分散式安裝Hadoop分散式
- hadoop2.2.0偽分散式安裝Hadoop分散式
- [hadoop] hadoop-all-in-one-偽分散式安裝Hadoop分散式
- Hadoop3偽分散式安裝指南Hadoop分散式
- hadoop 0.20.2偽分散式安裝詳解Hadoop分散式
- CentOS7 hadoop3.3.1安裝(單機分散式、偽分散式、分散式)CentOSHadoop分散式
- Ubuntu下偽分散式模式Hadoop的安裝及配置Ubuntu分散式模式Hadoop
- hadoop偽分散式叢集的安裝(不是單機版)Hadoop分散式
- Redis 偽分散式安裝部署配置Redis分散式
- hadoop+spark偽分散式HadoopSpark分散式
- 雲端計算課程實驗之安裝Hadoop及配置偽分散式模式的HadoopHadoop分散式模式
- Mac部署hadoop3(偽分散式)MacHadoop分散式
- 4.hadoop之偽分散式模式Hadoop分散式模式
- hadoop 2.8.5偽分散式環境搭建Hadoop分散式
- 構建Hadoop偽分散式環境Hadoop分散式
- hadoop2.4.1完全分散式安裝Hadoop分散式
- hadoop 偽分散式模式學習筆記Hadoop分散式模式筆記
- Hadoop yarn完全分散式安裝筆記HadoopYarn分散式筆記
- Hadoop 2.6 叢集搭建從零開始之3 Hadoop的安裝與配置(偽分散式環境)Hadoop分散式
- Hadoop入門(一)之Hadoop偽分散式環境搭建Hadoop分散式
- 大資料之Hadoop偽分散式的搭建大資料Hadoop分散式
- hadoop叢集搭建——單節點(偽分散式)Hadoop分散式
- Dockerfile完成Hadoop2.6的偽分散式搭建DockerHadoop分散式
- 分散式Hadoop1.2.1叢集的安裝分散式Hadoop
- Hadoop完全分散式模式的安裝和配置Hadoop分散式模式
- hadoop3.1.0 HDFS快速搭建偽分散式環境Hadoop分散式
- 分散式處理框架Hadoop的安裝與使用分散式框架Hadoop
- 【Hadoop】 分散式Hadoop叢集安裝配置Hadoop分散式
- java大資料最全課程學習筆記(1)--Hadoop簡介和安裝及偽分散式Java大資料筆記Hadoop分散式
- 大資料2-Hadoop偽分散式+ZK+HDFS大資料Hadoop分散式
- CentOS6 hadoop2.4完全分散式安裝文件CentOSHadoop分散式
- 完全分散式Hadoop叢集的安裝部署步驟分散式Hadoop
- Hadoop2.2.0多節點分散式安裝及測試Hadoop分散式
- Hbase分散式安裝分散式
- 【實驗】Hadoop2.6.0的偽分佈安裝Hadoop
- Linux下啟動偽分散式HADOOP && MySQL命令及指令碼Linux分散式HadoopMySql指令碼
- hadoop學習之hadoop完全分散式叢集安裝Hadoop分散式
- hadoop0.20.2偽分佈模式安裝和配置Hadoop模式