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.