You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Akira Ajisaka (Jira)" <ji...@apache.org> on 2022/02/28 02:00:00 UTC

[jira] [Updated] (HADOOP-16717) Remove GenericsUtil isLog4jLogger dependency on Log4jLoggerAdapter

     [ https://issues.apache.org/jira/browse/HADOOP-16717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Akira Ajisaka updated HADOOP-16717:
-----------------------------------
    Fix Version/s: 3.2.3

This issue blocks Spark 3.2 on YARN to upgrade to log4j2. Backported to branch-3.2 and branch-3.2.3.

> Remove GenericsUtil isLog4jLogger dependency on Log4jLoggerAdapter
> ------------------------------------------------------------------
>
>                 Key: HADOOP-16717
>                 URL: https://issues.apache.org/jira/browse/HADOOP-16717
>             Project: Hadoop Common
>          Issue Type: Improvement
>            Reporter: David Mollitor
>            Assignee: Xieming Li
>            Priority: Major
>             Fix For: 3.3.0, 3.2.3
>
>         Attachments: HADOOP-16717.001.patch, HADOOP-16717.002.patch, HADOOP-16717.003.patch
>
>
> Remove this method:
> {code:java}
>   /**
>    * Determine whether the log of <code>clazz</code> is Log4j implementation.
>    * @param clazz a class to be determined
>    * @return true if the log of <code>clazz</code> is Log4j implementation.
>    */
>   public static boolean isLog4jLogger(Class<?> clazz) {
>     if (clazz == null) {
>       return false;
>     }
>     Logger log = LoggerFactory.getLogger(clazz);
>     return log instanceof Log4jLoggerAdapter;
>   }
> {code}
> This creates a dependency on Log4jLoggerAdapter (slf4j-log4j12) which means that any project which depends on hadoop-commons needs to carry this dependency as well.  Such a simple use case and such a heavy dependency.  The commons library should not depend on any specific implementation of SLF4J binding



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org