Uploaded image for project: 'Accumulo'
  1. Accumulo
  2. ACCUMULO-3585

toString on Array doesn't log information as expected

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 1.6.2
    • 1.6.3, 1.7.0
    • None
    • None

    Description

      > http://git-wip-us.apache.org/repos/asf/accumulo/blob/ac44627e/server/base/src/main/java/org/apache/accumulo/server/util/TableDiskUsage.java
      > ----------------------------------------------------------------------
      > diff --git
      > a/server/base/src/main/java/org/apache/accumulo/server/util/TableDiskUsage.java
      > b/server/base/src/main/java/org/apache/accumulo/server/util/TableDiskUsage.java
      > index 9a54927..24eac05 100644
      > ---
      > a/server/base/src/main/java/org/apache/accumulo/server/util/TableDiskUsage.java
      > +++
      > b/server/base/src/main/java/org/apache/accumulo/server/util/TableDiskUsage.java
      > @@ -96,7 +96,9 @@ public class TableDiskUsage {
      >      Map<List<Integer>,Long> usage = new HashMap<List<Integer>,Long>();
      >
      >      for (Entry<String,Integer[]> entry : tableFiles.entrySet()) {
      > -      log.info("fileSizes " + fileSizes + " key " +
      > Arrays.asList(entry.getKey()));
      > +      if (log.isTraceEnabled()) {
      > +        log.trace("fileSizes " + fileSizes + " key " + entry.getKey());
      > +      }
      >
      

      Caught by kturner

      Arrays usually have completely useless toString() methods. So going from
      Arrays.asList(entry.getKey()).toString() to entry.getKey().toString().
      will likely not print the Integer[] array contents

      Attachments

        Activity

          People

            elserj Josh Elser
            elserj Josh Elser
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 40m
                40m