[
https://issues.apache.org/jira/browse/MRUNIT-125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13425281#comment-13425281
]
Bertrand Dechoux commented on MRUNIT-125:
-----------------------------------------
So I know there is a lot of different point of views on whether the old API
should be kept or not.
I found out that a few setters were not in the old API so I kinda added then
because I moved 'everything' to the parent.
The question I will ask myself later is what is the consequence. I have been
looking at the run() method and they are not the same for the mapred and
mapreduce. Is that normal? Intended? Expected? I know the hadoop API is not the
same but MRUnit is not checking the arguments the same way...
I attached a preview version with lots of copy/paste/delete but not much brain
power used.
> reduce duplicate code related to fluent methods with generics
> -------------------------------------------------------------
>
> Key: MRUNIT-125
> URL: https://issues.apache.org/jira/browse/MRUNIT-125
> Project: MRUnit
> Issue Type: Improvement
> Reporter: Jim Donofrio
> Assignee: Bertrand Dechoux
> Fix For: 1.0.0
>
> Attachments: mrunit-125-spoiler.diff, mrunit-125-spoiler.diff
>
>
> There is a lot of duplicate code in order to provide fluent style with
> methods. We could reduce the duplicate code with generics by adding an
> unbound type parameter T to TestDriver and then all the fluent methods could
> go in TestDriver but return type T. The base classes, MapDriverBase etc,
> would just pass the T on so you would have:
> public abstract class TestDriver<K1, V1, K2, V2, T>
> public abstract class MapDriverBase<K1, V1, K2, V2, T> extends TestDriver<K1,
> V1, K2, V2, T>
> public class MapDriver<K1, V1, K2, V2> extends MapDriverBase<K1, V1, K2, V2,
> MapDriver<K1, V1, K2, V2>>
--
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