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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.19.0
    • Fix Version/s: 0.19.1
    • Component/s: None
    • Labels:
      None
    • Environment:

      Ubuntu 8.04, Java 6, MySQL 5.0 (most likely not relevant)

    • Hadoop Flags:
      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. hadoop-4955.txt
          3 kB
          Kevin Peterson
        2. patch.txt
          0.7 kB
          Kevin Peterson

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: