Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-16717

Remove GenericsUtil isLog4jLogger dependency on Log4jLoggerAdapter

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.3.0, 3.2.3
    • None
    • None
    • Reviewed

    Description

      Remove this method:

        /**
         * 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;
        }
      

      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

      Attachments

        1. HADOOP-16717.001.patch
          2 kB
          Xieming Li
        2. HADOOP-16717.002.patch
          1 kB
          Xieming Li
        3. HADOOP-16717.003.patch
          1 kB
          Xieming Li

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            risyomei Xieming Li
            belugabehr David Mollitor
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment