Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-6842

"hadoop fs -text" does not give a useful text representation of MapWritable objects

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.20.0
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: io
    • Labels:
      None
    • Target Version/s:

      Description

      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();
      }

        Attachments

        1. HADOOP-6842.patch
          0.4 kB
          Brandon Forehand
        2. HADOOP-6842.002.patch
          1 kB
          Akira Ajisaka

          Activity

            People

            • Assignee:
              ajisakaa Akira Ajisaka
              Reporter:
              slider Steven K. Wong
            • Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: