在命令行下输入hadoop classpath,复制返回的内容,然后在yarn-site.xml(/opt/module/hadoop-3.1.3/etc/hadoop)的<configuration>下加上
hadoop classpath
yarn-site.xml(/opt/module/hadoop-3.1.3/etc/hadoop)的<configuration>下
<configuration>
<property> <name>yarn.application.classpath</name> <value>输入刚才返回的Hadoop classpath路径</value> </property>