[
https://issues.apache.org/jira/browse/HADOOP-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475921
]
David Bowen commented on HADOOP-1041:
-------------------------------------
The long names are certainly ugly.
The part after the '#' is generated by toString(), so you can change it by
defining your enum accordingly. I considered lower-casing the output of
toString(), but with the long names it actually helps to have the most relevant
part of the name in capitals.
I could strip off the class name in the presentation code. Normally this will
be OK, but the worst case is only that you might see two counters which appear
to have the same name. One issue though: currently the counters are sorted by
the long names. This sorting might look funny if we only show the short names,
but on the other hand it keeps related counters (those from the same
class/package) together.
We could have a link on the page that toggles between the long and short names.
An alternative is that we can just get used to the ugly names... :-).
> Counter names are ugly
> ----------------------
>
> Key: HADOOP-1041
> URL: https://issues.apache.org/jira/browse/HADOOP-1041
> Project: Hadoop
> Issue Type: Improvement
> Components: mapred
> Affects Versions: 0.12.0
> Reporter: Owen O'Malley
> Fix For: 0.12.0
>
>
> Having the complete class name in the counter names makes them unique, but
> they are ugly to present to non-developers. It would be nice to have some way
> to have a nicer string presented to the user. Currently, the Enum is
> converted to a name like:
> key.getDeclaringClass().getName() + "#" + key.toString()
> which gives counter names like
> "org.apache.hadoop.examples.RandomWriter$Counters#BYTES_WRITTEN"
> which is unique, but not very user friendly. Perhaps, we should strip off the
> class name for presenting to the users, which would allow them to make nice
> names. In particular, you could define an enum type that overloaded toString
> to print a nice user friendly string.
> Thoughts?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.