Uploaded image for project: 'Hadoop Map/Reduce'
  1. Hadoop Map/Reduce
  2. MAPREDUCE-4523

DBOutputFormat cannot be easily subclassed

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 0.20.205.0
    • None
    • None

    Description

      In DBOutputFormat#setOutput(), job.setOutputFormat(DBOutputFormat.class) is called. When subclassing DBOutputFormat, this function must be overridden to call job.setOutputFormat(SubclassedDBOutputFormat.class), otherwise the custom subclass is never called. This is pretty unobvious at first glance, especially since most examples tell you to explicitly call job.setOutputFormat() in your setup function.

      I'm not sure this call is necessary in DBOutputFormat#setOutput() at all, given that it's unnecessary if people follow the examples and that it makes subclassing DBOutputFormat trickier than it should be.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jarusn Nathan Jarus
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: