Hadoop【环境搭建 02】【hadoop-3.1.3 单机版YARN】(配置、启动及验证)

本文详细介绍了如何在Linux环境下搭建Hadoop 3.1.3的单机版YARN,包括修改mapred-site.xml和yarn-site.xml配置,调整启动和停止shell脚本,以及启动服务后的验证步骤,如通过jps命令和Web UI (8088端口)检查NodeManager和ResourceManager是否正常运行。

1. 修改配置

进入 ${HADOOP_HOME}/etc/hadoop/ 目录下,修改以下配置:

  1. mapred-site.xml
[root@tcloud ~]# vim /usr/local/hadoop-3.1.3/etc/hadoop/mapred-site.xml
<configuration>
  <property>
	
/opt/module/jdk1.8.0_212/bin/java -javaagent:/opt/idea-IC-212.5457.46/lib/idea_rt.jar=38803:/opt/idea-IC-212.5457.46/bin -Dfile.encoding=UTF-8 -classpath /opt/module/jdk1.8.0_212/jre/lib/charsets.jar:/opt/module/jdk1.8.0_212/jre/lib/deploy.jar:/opt/module/jdk1.8.0_212/jre/lib/ext/cldrdata.jar:/opt/module/jdk1.8.0_212/jre/lib/ext/dnsns.jar:/opt/module/jdk1.8.0_212/jre/lib/ext/jaccess.jar:/opt/module/jdk1.8.0_212/jre/lib/ext/jfxrt.jar:/opt/module/jdk1.8.0_212/jre/lib/ext/localedata.jar:/opt/module/jdk1.8.0_212/jre/lib/ext/nashorn.jar:/opt/module/jdk1.8.0_212/jre/lib/ext/sunec.jar:/opt/module/jdk1.8.0_212/jre/lib/ext/sunjce_provider.jar:/opt/module/jdk1.8.0_212/jre/lib/ext/sunpkcs11.jar:/opt/module/jdk1.8.0_212/jre/lib/ext/zipfs.jar:/opt/module/jdk1.8.0_212/jre/lib/javaws.jar:/opt/module/jdk1.8.0_212/jre/lib/jce.jar:/opt/module/jdk1.8.0_212/jre/lib/jfr.jar:/opt/module/jdk1.8.0_212/jre/lib/jfxswt.jar:/opt/module/jdk1.8.0_212/jre/lib/jsse.jar:/opt/module/jdk1.8.0_212/jre/lib/management-agent.jar:/opt/module/jdk1.8.0_212/jre/lib/plugin.jar:/opt/module/jdk1.8.0_212/jre/lib/resources.jar:/opt/module/jdk1.8.0_212/jre/lib/rt.jar:/home/atguigu/IdeaProjects/myapp/target/classes:/opt/module/hadoop-3.1.3/share/hadoop/yarn/hadoop-yarn-api-3.1.3.jar:/opt/module/hadoop-3.1.3/share/hadoop/yarn/hadoop-yarn-client-3.1.3.jar:/opt/module/hadoop-3.1.3/share/hadoop/yarn/hadoop-yarn-common-3.1.3.jar:/opt/module/hadoop-3.1.3/share/hadoop/yarn/hadoop-yarn-registry-3.1.3.jar:/opt/module/hadoop-3.1.3/share/hadoop/yarn/hadoop-yarn-server-tests-3.1.3.jar:/opt/module/hadoop-3.1.3/share/hadoop/yarn/hadoop-yarn-services-api-3.1.3.jar:/opt/module/hadoop-3.1.3/share/hadoop/yarn/hadoop-yarn-server-common-3.1.3.jar:/opt/module/hadoop-3.1.3/share/hadoop/yarn/hadoop-yarn-server-router-3.1.3.jar:/opt/module/hadoop-3.1.3/share/hadoop/yarn/hadoop-yarn-services-core-3.1.3.jar:/opt/module/hadoop-3.1.3/share/hadoop/yarn/hadoop-yarn-server-web-proxy-3.1.3.jar:/opt/module/hadoop-3.1.3/share/hadoop/yarn/hadoop-yarn-server-nodemanager-3.1.3.jar:/opt/module/hadoop-3.1.3/share/hadoop/yarn/hadoop-yarn-server-resourcemanager-3.1.3.jar:/opt/module/hadoop-3.1.3/share/hadoop/yarn/hadoop-yarn-server-sharedcachemanager-3.1.3.jar:/opt/module/hadoop-3.1.3/share/hadoop/yarn/hadoop-yarn-applications-distributedshell-3.1.3.jar:/opt/module/hadoop-3.1.3/share/hadoop/yarn/hadoop-yarn-server-timeline-pluginstorage-3.1.3.jar:/opt/module/hadoop-3.1.3/share/hadoop/yarn/hadoop-yarn-server-applicationhistoryservice-3.1.3.jar:/opt/module/hadoop-3.1.3/share/hadoop/yarn/hadoop-yarn-applications-unmanaged-am-launcher-3.1.3.jar:/opt/module/hadoop-3.1.3/share/hadoop/common/hadoop-kms-3.1.3.jar:/opt/module/hadoop-3.1.3/share/hadoop/common/hadoop-nfs-3.1.3.jar:/opt/module/hadoop-3.1.3/share/hadoop/common/hadoop-common-3.1.3.jar:/opt/module/hadoop-3.1.3/share/hadoop/common/hadoop-common-3.1.3-tests.jar:/opt/module/hadoop-3.1.3/share/hadoop/mapreduce/hadoop-mapreduce-examples-3.1.3.jar:/opt/module/hadoop-3.1.3/share/hadoop/mapreduce/hadoop-mapreduce-client-hs-3.1.3.jar:/opt/module/hadoop-3.1.3/share/hadoop/mapreduce/hadoop-mapreduce-client-app-3.1.3.jar:/opt/module/hadoop-3.1.3/share/hadoop/mapreduce/hadoop-mapreduce-client-core-3.1.3.jar:/opt/module/hadoop-3.1.3/share/hadoop/mapreduce/hadoop-mapreduce-client-common-3.1.3.jar:/opt/module/hadoop-3.1.3/share/hadoop/mapreduce/hadoop-mapreduce-client-shuffle-3.1.3.jar:/opt/module/hadoop-3.1.3/share/hadoop/mapreduce/hadoop-mapreduce-client-uploader-3.1.3.jar:/opt/module/hadoop-3.1.3/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-3.1.3.jar:/opt/module/hadoop-3.1.3/share/hadoop/mapreduce/hadoop-mapreduce-client-hs-plugins-3.1.3.jar:/opt/module/hadoop-3.1.3/share/hadoop/mapreduce/hadoop-mapreduce-client-nativetask-3.1.3.jar:/opt/module/hadoop-3.1.3/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-3.1.3-tests.jar com.atguigu.mapreduce.wordcount.WordCountDriver Exception in thread "main" java.lang.NoClassDefFoundError: com/ctc/wstx/io/InputBootstrapper at com.atguigu.mapreduce.wordcount.WordCountDriver.main(WordCountDriver.java:14) Caused by: java.lang.ClassNotFoundException: com.ctc.wstx.io.InputBootstrapper at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 1 more
最新发布
06-18
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

@寻觅远方

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值