栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

Hadoop-Yarn奇葩问题整理

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Hadoop-Yarn奇葩问题整理

Yarn 命令异常

[root@hadoop01 sbin]# yarn application -kill application_1655090665495_0013
Error: Could not find or load main class org.apache.hadoop.yarn.client.cli.ApplicationCLI
[root@hadoop01 sbin]# yarn -kill application_1655090665495_0013
Unrecognized option: -kill
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
[root@hadoop01 sbin]# hadoop job -kill application_1655090665495_0013
DEPRECATED: Use of this script to execute mapred command is deprecated.
Instead use the mapred command for it.

Error: Could not find or load main class org.apache.hadoop.mapred.JobClient
[root@hadoop01 sbin]# yarn application -list
Error: Could not find or load main class org.apache.hadoop.yarn.client.cli.ApplicationCLI
[root@hadoop01 sbin]# yarn application -status
Error: Could not find or load main class org.apache.hadoop.yarn.client.cli.ApplicationCLI
[root@hadoop01 sbin]# yarn app -status
Error: Could not find or load main class app
[root@hadoop01 sbin]# yarn applicationcli -status
Error: Could not find or load main class applicationcli
[root@hadoop01 sbin]# yarn application -status
Error: Could not find or load main class org.apache.hadoop.yarn.client.cli.ApplicationCLI
[root@hadoop01 sbin]# hadoop job -kill application_1655090665495_0013
DEPRECATED: Use of this script to execute mapred command is deprecated.
Instead use the mapred command for it.

Error: Could not find or load main class org.apache.hadoop.mapred.JobClient
 

[root@hadoop01 sbin]# yarn application -kill application_1655090665495_0013
Error: Could not find or load main class org.apache.hadoop.yarn.client.cli.ApplicationCLI
[root@hadoop01 sbin]# yarn -kill application_1655090665495_0013
Unrecognized option: -kill
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
[root@hadoop01 sbin]# hadoop job -kill application_1655090665495_0013
DEPRECATED: Use of this script to execute mapred command is deprecated.
Instead use the mapred command for it.

Error: Could not find or load main class org.apache.hadoop.mapred.JobClient
[root@hadoop01 sbin]# yarn application -list
Error: Could not find or load main class org.apache.hadoop.yarn.client.cli.ApplicationCLI
[root@hadoop01 sbin]# yarn application -status
Error: Could not find or load main class org.apache.hadoop.yarn.client.cli.ApplicationCLI
[root@hadoop01 sbin]# yarn app -status
Error: Could not find or load main class app
[root@hadoop01 sbin]# yarn applicationcli -status
Error: Could not find or load main class applicationcli
[root@hadoop01 sbin]# yarn application -status
Error: Could not find or load main class org.apache.hadoop.yarn.client.cli.ApplicationCLI
[root@hadoop01 sbin]# hadoop job -kill application_1655090665495_0013
DEPRECATED: Use of this script to execute mapred command is deprecated.
Instead use the mapred command for it.

Error: Could not find or load main class org.apache.hadoop.mapred.JobClient

查看hadoop classpath检查如下jar包路径,了解hadoop的看到这里就已经明白问题所在了

/usr/local/soft/hadoop-2.7.7/etc/hadoop,
/usr/local/soft/hadoop-2.7.7/share/hadoop/common/lib/*,
/usr/local/soft/hadoop-2.7.7/share/hadoop/common/*,
/usr/local/soft/hadoop-2.7.7/share/hadoop/hdfs,
/usr/local/soft/hadoop-2.7.7/share/hadoop/hdfs/lib/*,
/usr/local/soft/hadoop-2.7.7/share/hadoop/hdfs/*,
# /usr/hdp/2.6.5.0-292/hadoop-yarn/share/hadoop/yarn/*, # 
# /usr/hdp/2.6.5.0-292/hadoop-mapreduce/share/hadoop/mapreduce/*, #
/usr/local/soft/hadoop-2.7.7/contrib/capacity-scheduler/*.jar

注释掉的两行与上面不是一个版本的,这是因为环境中存在多个版本的hadoop,且新版本的环境变量未生效,导致版本jar包加载混乱导致的

解决办法很简单,删除老版本,重新执行source刷新环境变量即可

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/973860.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号