Hadoop Common
  1. Hadoop Common
  2. HADOOP-6884

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

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.22.0
    • Fix Version/s: 0.22.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      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).

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

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Erik Steffl
              Reporter:
              Erik Steffl
            • Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development