Enabling Centralized Logging for MapReduce Version 2

As of 4.0.2, you can use centralized logging for MapReduce version 2 applications but it is disabled by default. In 4.0.1, centralized logging is not supported for MRv2 applications.
Configure the yarn.use-central-logging-for-mapreduce-only property in the yarn-site.xml file to enable or disable centralized logging.
The yarn-site.xml file is located in the following directory: /opt/mapr/hadoop/hadoop-2.x.x/etc/hadoop/.
  • To disable centralized logging, remove the property yarn.use-central-logging-for-mapreduce-only from the yarn-site.xml or set the value of yarn.use-central-logging-for-mapreduce-only to false in yarn-site.xml.
  • To enable centralized logging, set the value of yarn.use-central-logging-for-mapreduce-only to true in yarn-site.xml. If you enable centralized logging while applications are running, restart all ResourceManagers. In a production cluster, restart ResoureManagers one at a time to prevent interruption to the applications running. The applications running during this process may not have centralized logging enabled.