[ https://issues.apache.org/jira/browse/HADOOP-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12476018 ]
James P. White commented on HADOOP-1041: ---------------------------------------- An example of how to bridge the gap between programmers and translators is something like this: <target name="build-default-resource-bundle"> <concat destfile="${build.classes}/HadoopPresentation.properties" force="yes" fixlastline="yes" eol="lf"> <fileset dir="${src.dir}" includes="**/HadoopPresentation_en.properties"/> </concat> <exec executable="sort"> <arg value="-o"/> <arg file="${build.classes}/HadoopPresentation.properties"/> <arg file="${build.classes}/HadoopPresentation.properties"/> </exec> </target> That grabs up little English property resource bundles from the source tree and makes a default property resource bundle out of it. The sort is done so that changes to the build don't make spurious changes to the bundle. Now that doesn't address how bundles from multiple JARs are handled. Dealing with that is a classpath issue and the best approach depends on how Hadoop is structured. The topic can be arcane, and isn't really addressed by most articles on the topic: http://java.sun.com/docs/books/tutorial/i18n/resbundle/control.html http://java.sun.com/javase/technologies/core/basic/intl/ I won't digress into musings on ClassLoader.getPackage and the like. If you have a scheme that delegates the bundles to the various JARs that you like, then that is probably fine. But there isn't going to be a good way out of long gangly key names, as they effectively have to be fully qualified class+field names in order to work (think of resource bundles as externalized object containers). > 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.