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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.20.0
    • 2.8.0, 3.0.0-alpha1
    • io
    • None

    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

            aajisaka Akira Ajisaka
            slider Steven K. Wong
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: