accumulo-notifications mailing list archives

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

    [ https://issues.apache.org/jira/browse/ACCUMULO-3585?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14318979#comment-14318979
] 

Keith Turner commented on ACCUMULO-3585:
----------------------------------------

spoke w/ [~ecn] offline about this.   I was thinking Arrays.asList() was called on entry.getValue(),
but its called on entry.getKey().  So there is techincally not a problem, although maybe the
code meant to use entry.getValue()???

> 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