You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-issues@hadoop.apache.org by "Nathan Jarus (JIRA)" <ji...@apache.org> on 2012/08/07 03:55:02 UTC

[jira] [Created] (MAPREDUCE-4523) DBOutputFormat cannot be easily subclassed

Nathan Jarus created MAPREDUCE-4523:
---------------------------------------

             Summary: DBOutputFormat cannot be easily subclassed
                 Key: MAPREDUCE-4523
                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4523
             Project: Hadoop Map/Reduce
          Issue Type: Improvement
    Affects Versions: 0.20.205.0
            Reporter: Nathan Jarus
            Priority: Minor


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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira