accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josh Elser (JIRA)" <j...@apache.org>
Subject [jira] [Created] (ACCUMULO-3585) toString on Array doesn't log information as expected
Date Thu, 12 Feb 2015 20:51:11 GMT
Josh Elser created ACCUMULO-3585:
------------------------------------

             Summary: toString on Array doesn't log information as expected
                 Key: ACCUMULO-3585
                 URL: https://issues.apache.org/jira/browse/ACCUMULO-3585
             Project: Accumulo
          Issue Type: Bug
    Affects Versions: 1.6.2
            Reporter: Josh Elser
            Assignee: Josh Elser
            Priority: Trivial
             Fix For: 1.7.0, 1.6.3


{noformat}
> 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());
> +      }
>
{noformat}

Caught by [~kturner]
{quote}
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
{quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message