yarn日志在应用程序完成后立即消失

wtzytmuj  于 2021-07-13  发布在  Hadoop
关注(0)|答案(0)|浏览(661)

我有一个运行hadoop作业的hadoop设置。例如,当应用程序开始运行时,它会打印应用程序id INFO impl.YarnClientImpl: Submitted application application_XXX . 当我尝试的时候 yarn logs -applicationId application_XXX ,只要作业仍在运行,它就会显示日志。一旦作业完成,日志就会消失,并且 yarn logs 命令不返回数据。该命令的日志包括以下几行(在连接到资源管理器和应用程序历史服务器之后,并且没有来自这些服务器的错误响应,没有404或类似的内容):

File /app-logs/hdfs/logs-tfile/application_XXX does not exist.
File /app-logs/hdfs/bucket-logs-tfile/0003/application_XXX does not exist.

Can not find any log file matching the pattern: [ALL] for the application: application_XXX
Can not find the logs for the application: application_XXX with the appOwner: hdfs

我没有找到一种方法来发现应用程序的日志是否已更改所有者并且现在不是所有者 hdfs ,或者日志确实已被删除。如何确保在作业完成运行后保留日志?
另一个细节:日志保留 yarn-site.xml 有以下内容:

<property>
      <name>yarn.log-aggregation-enable</name>
      <value>true</value>
    </property>

    <property>
      <name>yarn.log-aggregation.retain-seconds</name>
      <value>2592000</value>
    </property>

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题