[ 
https://issues.apache.org/jira/browse/HADOOP-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12476003
 ] 

James P. White commented on HADOOP-1041:
----------------------------------------

Resource bundles are logically associated with the presentation ("view") code 
rather than the underlying data ("model").  In a big modular application the 
code for constructing the bundles can become structured in whatever logical 
arrangement is desired.  And it usually seems (at least to programmers) that 
the delegation of model-specific view information should be distributed to the 
various modules.

But, in practice, what people who do localization want is for all text that 
needs to be translated to be in as few files as possible (preferrably one 
file).  And they especially don't want to deal with heirarchies and defaults 
and rules and overrides.

Ugly as it seems, resource bundles are indeed the actual enumeration of all 
concrete expressions that can be presented to the user.  And fewer bundles are 
better because that avoids both duplicating text and confusing translators.  So 
the best practice is usually to start with one, and then possibly refactor if 
and when it becomes unwieldy.  Lot's of little resource bundles with ambigous 
short key names is a definite anti-pattern.


> 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.

Reply via email to