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

Make DBOutputFormat us column names from setOutput(...)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.19.0
    • 0.19.1
    • None
    • None
    • Ubuntu 8.04, Java 6, MySQL 5.0 (most likely not relevant)

    • Reviewed

    Description

      In org.apache.hadoop.mapred.lib.db.DBOutputFormat, the supplied names of the columns are not used for inserting values. The column names supplied to DBOutputFormat.setOutput(JobConf, String, String...) are used to determine the number of values to insert, but the order is dictated by the table definition of the underlying database. This affects the correct indices for DBWritable.write(PreparedStatement).

      I will attach a patch that correctly maps these values.

      I am characterizing this as a bug rather than an improvement because there may be existing code which implicitly relied on DBOutputFormat ignoring the supplied table names.

      Attachments

        1. patch.txt
          0.7 kB
          Kevin Peterson
        2. hadoop-4955.txt
          3 kB
          Kevin Peterson

        Activity

          People

            kevinpet Kevin Peterson
            kevinpet Kevin Peterson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: