[
https://issues.apache.org/jira/browse/HADOOP-6842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13712939#comment-13712939
]
Brandon Forehand commented on HADOOP-6842:
------------------------------------------
I too would find this patch really useful. I've ran into this exact issue using
sequence files containing MapWritables. I think delegating to the
{{instance.toString()}} will just work even without using the {{new TreeMap}}
invocation.
It's been 3 years since this bug was reported, and it appears to be a one line
fix. Is there anyone willing to make this change?
> "hadoop fs -text" does not give a useful text representation of MapWritable
> objects
> -----------------------------------------------------------------------------------
>
> Key: HADOOP-6842
> URL: https://issues.apache.org/jira/browse/HADOOP-6842
> Project: Hadoop Common
> Issue Type: Improvement
> Components: io
> Affects Versions: 0.20.0
> Reporter: Steven Wong
>
> If a sequence file contains MapWritable objects, running "hadoop fs -text" on
> the file prints the following for each MapWritable:
> org.apache.hadoop.io.MapWritable@4f8235ed
> To be more useful, it should print out the contents of the map instead. This
> can be done by adding a toString method to MapWritable, i.e. something like:
> public String toString() {
> return (new TreeMap<Writable, Writable>(instance)).toString();
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira