概述
Hadoop 日志聚集是指将 Hadoop 集群中各个节点上的日志文件收集到一个中心位置,以便于管理和分析。要开启 Hadoop 日志聚集,您需要在 Hadoop 配置文件中进行相应的配置。具体操作步骤如下:
在
yarn-site.xml 文件中,添加以下配置项:
yarn.log-aggregation-enable true yarn.log.server.url yarn.log-aggregation.retain-seconds 604800
关闭NodeManager 、 ResourceManager 和 History Server
sbin/stop-yarn.sh mapred --daemon stop historyserver
启动NodeManager 、 ResourceManage 和 History Server
start-yarn.sh mapred --daemon start historyserver