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

Add LOG.isDebugEnabled() guard for each LOG.debug("...")

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.22.0
    • 0.22.0
    • None
    • None
    • Reviewed

    Description

      Each LOG.debug("...") should be executed only if LOG.isDebugEnabled() is true, in some cases it's expensive to construct the string that is being printed to log. It's much easier to always use LOG.isDebugEnabled() because it's easier to check (rather than in each case reason whether it's necessary or not).

      Attachments

        1. FunAgain.java
          3 kB
          Doug Cutting
        2. FunAgain.java
          3 kB
          Tsz-wo Sze
        3. HADOOP-6884-0.22-1.patch
          29 kB
          Erik Steffl
        4. HADOOP-6884-0.22.patch
          25 kB
          Erik Steffl

        Issue Links

          Activity

            People

              zasran Erik Steffl
              zasran Erik Steffl
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: