1. Enable Log Aggregation

Log aggregation is enabled in the yarn-site.xml file. The yarn.log-aggregation-enable property enables log aggregation for running applications. You must also specify a log aggregation time interval using the yarn.nodemanager.log-aggregation.roll-monitoring-interval-seconds property. The logs for running applications are aggregated at the specified interval. The minimum monitoring interval value is 3600 seconds (one hour).

You can also set the monitoring interval value to -1 to disable log aggregation for running applications, and wait until the application finishes running to enable log aggregation.

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

 <property>
 <name>yarn.nodemanager.log-aggregation.roll-monitoring-interval-seconds</name>
 <value>3600</value>
 </property>         
        

[Note]Note

Clients should roll over their logs using a log roll-over application such as log4j.


loading table of contents...