Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-1320

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

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: 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 wheather it's neccessary or not).

        Attachments

        1. HDFS-1320-0.22-3.patch
          99 kB
          Erik Steffl
        2. HDFS-1320-0.22-2.patch
          99 kB
          Erik Steffl
        3. HDFS-1320-0.22-1.patch
          99 kB
          Erik Steffl
        4. HDFS-1320-0.22.patch
          74 kB
          Erik Steffl

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: