You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Allen Wittenauer (JIRA)" <ji...@apache.org> on 2015/05/06 05:38:34 UTC
[jira] [Updated] (HADOOP-6842) "hadoop fs -text" does not give a
useful text representation of MapWritable objects
[ https://issues.apache.org/jira/browse/HADOOP-6842?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Allen Wittenauer updated HADOOP-6842:
-------------------------------------
Labels: BB2015-05-TBR (was: )
> "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
> Labels: BB2015-05-TBR
> Attachments: HADOOP-6842.patch
>
>
> 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 was sent by Atlassian JIRA
(v6.3.4#6332)