大橙子网站建设,新征程启航
为企业提供网站建设、域名注册、服务器等服务
这篇文章主要介绍“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
~
[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伪分布式安装方法是什么”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注创新互联-成都网站建设公司网站,小编会继续努力为大家带来更多实用的文章!