Overriding java logging config

0
-rw-r--r--  1 yarn yarn   4.8G Jul 29 04:43 hadoop-yarn-timelineserver-ip-172-31-23-227.out

Jul 29, 2022 4:44:14 AM com.sun.jersey.server.wadl.generators.AbstractWadlGeneratorGrammarGenerator attachTypes
INFO: Couldn't find grammar element for class javax.ws.rs.core.Response
Jul 29, 2022 4:44:14 AM com.sun.jersey.server.wadl.generators.AbstractWadlGeneratorGrammarGenerator attachTypes
INFO: Couldn't find grammar element for class javax.ws.rs.core.Response
Jul 29, 2022 4:44:14 AM com.sun.jersey.server.wadl.generators.AbstractWadlGeneratorGrammarGenerator attachTypes
INFO: Couldn't find grammar element for class javax.ws.rs.core.Response
Jul 29, 2022 4:44:14 AM com.sun.jersey.server.wadl.generators.AbstractWadlGeneratorGrammarGenerator attachTypes
INFO: Couldn't find grammar element for class javax.ws.rs.core.Response
Jul 29, 2022 4:44:14 AM com.sun.jersey.server.wadl.generators.AbstractWadlGeneratorGrammarGenerator attachTypes
INFO: Couldn't find grammar element for class javax.ws.rs.core.Response

I've just found that the .out file of YARN timeline server is abnormally big and it consumes /mnt partition. The file just has tons of useless messages for me written by AbstractWadlGeneratorGrammarGenerator class of jersey-server module.

AbstractWadlGeneratorGrammarGenerator.java


...
import java.util.logging.Logger;
...
private static final Logger LOGGER = Logger.getLogger( AbstractWadlGeneratorGrammarGenerator.class.getName() );
...
LOGGER.info("Couldn't find grammar element for class " + parameterClass.getName());
...

However, AbstractWadlGeneratorGrammarGenerator writes the message by Java logger, not log4j.

Can I override Java logger configuration for EMR servers, especially YARN timeline server?

preguntada hace 2 años295 visualizaciones
1 Respuesta
1
Respuesta aceptada

This has been an outstanding issue until YARN-9554 which is fixed in Hadoop 3.3.0. However, EMR as of now packages only 3.2.1 in the latest EMR-6.7.0. I can confirm there is work underway to backport this to 3.2.1 for EMR which should be included in the upcoming release of EMR.

As a workaround you can do the following:

Login to the Master node of the EMR cluster to run the below commands or bake them as a bash script to submit it as a scriptrunner - EMR Step using console / CLI / SDK

  1. Add logging properties to JRE
echo 'com.sun.jersey.server.wadl.generators.level = OFF' | sudo tee -a /etc/alternatives/jre/lib/logging.properties > /dev/null
  1. Restart the Timeline Server to apply the changes
sudo systemctl restart hadoop-yarn-timelineserver

Please test the same in your lower environments and reply back if you have additional questions regarding the same.

AWS
INGENIERO DE SOPORTE
respondido hace 2 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas