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

  1. 执行hadoop classpath
  2. 在hadoop配置文件 yarn-site中添加以下配置 <property> <name>yarn.application.classpath</name>
            <value>/home/hadoop/hadoop-3.3.1/etc/hadoop:/home/hadoop/hadoop-3.3.1/share/hadoop/common/lib/:/home/hadoop/hadoop-3.3.1/share/hadoop/common/:/home/hadoop/hadoop-3.3.1/share/hadoop/hdfs:/home/hadoop/hadoop-3.3.1/share/hadoop/hdfs/lib/:/home/hadoop/hadoop-3.3.1/share/hadoop/hdfs/:/home/hadoop/hadoop-3.3.1/share/hadoop/mapreduce/:/home/hadoop/hadoop-3.3.1/share/hadoop/yarn:/home/hadoop/hadoop-3.3.1/share/hadoop/yarn/lib/:/home/hadoop/hadoop-3.3.1/share/hadoop/yarn/*</value>
        </property>
  3. 执行 source /etc/profile
  4. 重启生效
posted @ 2021-07-30 14:56  闵开慧  阅读(656)  评论(0编辑  收藏  举报