这篇文章主要介绍“hadoop伪分布式安装方法是什么”,在日常操作中,相信很多人在Hadoop伪分布式安装方法是什么问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”Hadoop伪分布式安装方法是什么”的疑惑有所
这篇文章主要介绍“hadoop伪分布式安装方法是什么”,在日常操作中,相信很多人在Hadoop伪分布式安装方法是什么问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”Hadoop伪分布式安装方法是什么”的疑惑有所帮助!接下来,请跟着小编一起来学习吧!
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]$
到此,关于“Hadoop伪分布式安装方法是什么”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注编程网网站,小编会继续努力为大家带来更多实用的文章!
--结束END--
本文标题: Hadoop伪分布式安装方法是什么
本文链接: https://lsjlt.com/news/232125.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-05-24
2024-05-24
2024-05-24
2024-05-24
2024-05-24
2024-05-24
2024-05-24
2024-05-24
2024-05-24
2024-05-24
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0