You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mrunit.apache.org by "Jim Donofrio (JIRA)" <ji...@apache.org> on 2012/07/27 14:30:33 UTC

[jira] [Created] (MRUNIT-125) reduce duplicate code related to fluent methods with generics

Jim Donofrio created MRUNIT-125:
-----------------------------------

             Summary: 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
             Fix For: 1.0.0


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

        

[jira] [Updated] (MRUNIT-125) reduce duplicate code related to fluent methods with generics

Posted by "Bertrand Dechoux (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MRUNIT-125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bertrand Dechoux updated MRUNIT-125:
------------------------------------

    Attachment: mrunit-125-patch.diff

Same as before but with the grant.
I did all that could be done regarding the issue.
All tests are green.

The only thing to do is the merge with MRUNIT-64.
As you are planning to review it, can I ask you to review this one too and see what should be done for merging the patches for those two issues?
                
> 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-patch.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

        

[jira] [Commented] (MRUNIT-125) reduce duplicate code related to fluent methods with generics

Posted by "Brock Noland (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MRUNIT-125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13428208#comment-13428208 ] 

Brock Noland commented on MRUNIT-125:
-------------------------------------

Bertrand,

I am huge +1 on the idea of the patch. I like what you are doing here. However, it looks like patch includes a bunch of changes already applied, such as the changes in MRUNIT-122.


Brock
                
> 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: Brock Noland
>             Fix For: 1.0.0
>
>         Attachments: mrunit-125-patch.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

        

[jira] [Commented] (MRUNIT-125) reduce duplicate code related to fluent methods with generics

Posted by "Bertrand Dechoux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MRUNIT-125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13424628#comment-13424628 ] 

Bertrand Dechoux commented on MRUNIT-125:
-----------------------------------------

I would gladly work on this one as it an extension on my previous experience with MRunit internals : MR-119.
But I was waiting for my first patch to be approved and committed in order to start from a stable enough code base.
                
> 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: Jarek Jarcec Cecho
>             Fix For: 1.0.0
>
>
> 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

        

[jira] [Assigned] (MRUNIT-125) reduce duplicate code related to fluent methods with generics

Posted by "Jarek Jarcec Cecho (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MRUNIT-125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jarek Jarcec Cecho reassigned MRUNIT-125:
-----------------------------------------

    Assignee: Bertrand Dechoux  (was: Jarek Jarcec Cecho)

Hi Bertrand,
I wanted to work on this from same reason as you (remove code duplicity I've introduced during counter checking patch). 

I've assigned this ticket to you, so please feel free to work on this. Just ping me if you'll be out of time and I'll finish this.

Jarcec
                
> 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
>
>
> 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

        

[jira] [Commented] (MRUNIT-125) reduce duplicate code related to fluent methods with generics

Posted by "Dave Beech (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MRUNIT-125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13429120#comment-13429120 ] 

Dave Beech commented on MRUNIT-125:
-----------------------------------

No problem, thanks - I did think it was a little strange and probably not intentional. It would be best if you submit a brand new patch on top of trunk with the methods removed. 

I have no strong objections to the methods being final, but I think if we do it we should be consistent (rather than just making the odd one or two methods final and leaving the rest extendable). Otherwise it may get confusing for users as to why we've done that. 

Does anybody else have an opinion?
                
> 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-patch.diff, mrunit-125-spoiler.diff, mrunit-125.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

        

[jira] [Updated] (MRUNIT-125) reduce duplicate code related to fluent methods with generics

Posted by "Bertrand Dechoux (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MRUNIT-125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bertrand Dechoux updated MRUNIT-125:
------------------------------------

    Attachment: mrunit-125-spoiler.diff
    
> 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
>
>
> 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

        

[jira] [Commented] (MRUNIT-125) reduce duplicate code related to fluent methods with generics

Posted by "Jarek Jarcec Cecho (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MRUNIT-125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13424608#comment-13424608 ] 

Jarek Jarcec Cecho commented on MRUNIT-125:
-------------------------------------------

I'm definitely +1 on this one.

Jarcec
                
> 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
>             Fix For: 1.0.0
>
>
> 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

        

[jira] [Commented] (MRUNIT-125) reduce duplicate code related to fluent methods with generics

Posted by "Brock Noland (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MRUNIT-125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13429486#comment-13429486 ] 

Brock Noland commented on MRUNIT-125:
-------------------------------------

The map input stuff should be only be in MapDriver since there is no such thing in ReduceDriver. I created MRUNIT-133 for this.
                
> 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-2.diff, mrunit-125-patch.diff, mrunit-125-spoiler.diff, mrunit-125.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

        

[jira] [Commented] (MRUNIT-125) reduce duplicate code related to fluent methods with generics

Posted by "Bertrand Dechoux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MRUNIT-125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13429099#comment-13429099 ] 

Bertrand Dechoux commented on MRUNIT-125:
-----------------------------------------

Good work Bertrand. A question though - the fluent methods work well now in the base classes, so why do we still need them in the individual drivers? If we don't delete them, we've got more duplication than when we started! I think these can be safely removed now. 

> That's clearly an error. I did remove them for the first patch, maybe I missed a few of them when I updated the version of my working copy. Would that make sense to you if I add a final keyword to all of these methods? It would help me and I don't see any reasons for not doing so. Worst case, we could remove the final keyword later if needed and it shouldn't impact anybody.

> Anyway, I cannot  check now but if I do need to change my patch, how we do it? I submit a patch on the patch? (Brock did commit it.)

Also - please be careful not to lose the @Deprecated markers that James introduced in MRUNIT-64, and watch out for javadoc warnings following the code move. 

> I clearly saw them in the patch of MRUNIT-64 but not in the trunk... I will check again.

                
> 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-patch.diff, mrunit-125-spoiler.diff, mrunit-125.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

        

[jira] [Updated] (MRUNIT-125) reduce duplicate code related to fluent methods with generics

Posted by "Bertrand Dechoux (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MRUNIT-125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bertrand Dechoux updated MRUNIT-125:
------------------------------------

    Attachment:     (was: mrunit-125-spoiler.diff)
    
> 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
>
>
> 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

        

[jira] [Assigned] (MRUNIT-125) reduce duplicate code related to fluent methods with generics

Posted by "Bertrand Dechoux (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MRUNIT-125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bertrand Dechoux reassigned MRUNIT-125:
---------------------------------------

    Assignee: Brock Noland  (was: Bertrand Dechoux)
    
> 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: Brock Noland
>             Fix For: 1.0.0
>
>         Attachments: mrunit-125-patch.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

        

[jira] [Commented] (MRUNIT-125) reduce duplicate code related to fluent methods with generics

Posted by "Bertrand Dechoux (JIRA)" <ji...@apache.org>.
    [ 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

        

[jira] [Resolved] (MRUNIT-125) reduce duplicate code related to fluent methods with generics

Posted by "Brock Noland (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MRUNIT-125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brock Noland resolved MRUNIT-125.
---------------------------------

    Resolution: Fixed
      Assignee: Bertrand Dechoux  (was: Brock Noland)

Committed in 1369676. Thank you very much for your great work Bertrand!
                
> 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-patch.diff, mrunit-125-spoiler.diff, mrunit-125.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

        

[jira] [Updated] (MRUNIT-125) reduce duplicate code related to fluent methods with generics

Posted by "Bertrand Dechoux (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MRUNIT-125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bertrand Dechoux updated MRUNIT-125:
------------------------------------

    Attachment: mrunit-125.diff

Patch on the update trunk. (with pre run checks, now the same, moved to the parent class)
                
> 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: Brock Noland
>             Fix For: 1.0.0
>
>         Attachments: mrunit-125-patch.diff, mrunit-125-spoiler.diff, mrunit-125.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

        

[jira] [Commented] (MRUNIT-125) reduce duplicate code related to fluent methods with generics

Posted by "Dave Beech (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MRUNIT-125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13429460#comment-13429460 ] 

Dave Beech commented on MRUNIT-125:
-----------------------------------

Committed the new patch in 1370030
                
> 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-2.diff, mrunit-125-patch.diff, mrunit-125-spoiler.diff, mrunit-125.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

        

[jira] [Commented] (MRUNIT-125) reduce duplicate code related to fluent methods with generics

Posted by "Dave Beech (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MRUNIT-125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13429455#comment-13429455 ] 

Dave Beech commented on MRUNIT-125:
-----------------------------------

Great - thanks very much Bertrand, that looks good. 

I've also wondered about the map input path being present on reduce tests. Brock will probably know, I think he added that feature. You were right to move it there for consistency with the setter/getter though. And I think a varargs version of the input methods would be a nice thing to have. Feel free to add this as a new "improvement" JIRA if you like.
                
> 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-2.diff, mrunit-125-patch.diff, mrunit-125-spoiler.diff, mrunit-125.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

        

[jira] [Comment Edited] (MRUNIT-125) reduce duplicate code related to fluent methods with generics

Posted by "Bertrand Dechoux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MRUNIT-125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13424628#comment-13424628 ] 

Bertrand Dechoux edited comment on MRUNIT-125 at 7/31/12 5:20 AM:
------------------------------------------------------------------

I would gladly work on this one as it an extension on my previous experience with MRunit internals : MRUNIT-119.
But I was waiting for my first patch to be approved and committed in order to start from a stable enough code base.
                
      was (Author: bdechoux):
    I would gladly work on this one as it an extension on my previous experience with MRunit internals : MR-119.
But I was waiting for my first patch to be approved and committed in order to start from a stable enough code base.
                  
> 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
>
>
> 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

        

[jira] [Updated] (MRUNIT-125) reduce duplicate code related to fluent methods with generics

Posted by "Bertrand Dechoux (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MRUNIT-125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bertrand Dechoux updated MRUNIT-125:
------------------------------------

    Attachment: mrunit-125-2.diff

Add patch of patch.

And 2 notes :
* Is that normal to have map input path stuff in TestDriver? I moved the related fluent method there to be consistent but...
* Not related to the issue but do varargs have been considered for 'list of inputs'? That's what is the closest to a list literal in Java (with type issues in bonus, I know).
                
> 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-2.diff, mrunit-125-patch.diff, mrunit-125-spoiler.diff, mrunit-125.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

        

[jira] [Commented] (MRUNIT-125) reduce duplicate code related to fluent methods with generics

Posted by "Dave Beech (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MRUNIT-125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13429087#comment-13429087 ] 

Dave Beech commented on MRUNIT-125:
-----------------------------------

Good work Bertrand. A question though - the fluent methods work well now in the base classes, so why do we still need them in the individual drivers? If we don't delete them, we've got more duplication than when we started! I think these can be safely removed now. 

Also - please be careful not to lose the @Deprecated markers that James introduced in MRUNIT-64, and watch out for javadoc warnings following the code move. 

Thanks!


                
> 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-patch.diff, mrunit-125-spoiler.diff, mrunit-125.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

        

[jira] [Updated] (MRUNIT-125) reduce duplicate code related to fluent methods with generics

Posted by "Bertrand Dechoux (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MRUNIT-125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bertrand Dechoux updated MRUNIT-125:
------------------------------------

    Attachment: mrunit-125-spoiler.diff
    
> 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
>
>
> 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

        

[jira] [Comment Edited] (MRUNIT-125) reduce duplicate code related to fluent methods with generics

Posted by "Bertrand Dechoux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MRUNIT-125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13429431#comment-13429431 ] 

Bertrand Dechoux edited comment on MRUNIT-125 at 8/6/12 9:15 PM:
-----------------------------------------------------------------

Add patch of patch (without any additional 'final').

And 2 notes :
* Is that normal to have map input path stuff in TestDriver? I moved the related fluent method there to be consistent but...
* Not related to the issue but do varargs have been considered for 'list of inputs'? That's what is the closest to a list literal in Java (with type issues in bonus, I know).


                
      was (Author: bdechoux):
    Add patch of patch.

And 2 notes :
* Is that normal to have map input path stuff in TestDriver? I moved the related fluent method there to be consistent but...
* Not related to the issue but do varargs have been considered for 'list of inputs'? That's what is the closest to a list literal in Java (with type issues in bonus, I know).
                  
> 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-2.diff, mrunit-125-patch.diff, mrunit-125-spoiler.diff, mrunit-125.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

        

[jira] [Commented] (MRUNIT-125) reduce duplicate code related to fluent methods with generics

Posted by "Brock Noland (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MRUNIT-125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13425800#comment-13425800 ] 

Brock Noland commented on MRUNIT-125:
-------------------------------------

The run method is different between mapred and mapreduce. I have not spent much time look at why though.
                
> 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
>
>
> 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

        

[jira] [Comment Edited] (MRUNIT-125) reduce duplicate code related to fluent methods with generics

Posted by "Bertrand Dechoux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MRUNIT-125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13428900#comment-13428900 ] 

Bertrand Dechoux edited comment on MRUNIT-125 at 8/5/12 7:30 PM:
-----------------------------------------------------------------

Patch on an updated trunk. (with pre run checks, now the same, moved to the parent class)
                
      was (Author: bdechoux):
    Patch on the update trunk. (with pre run checks, now the same, moved to the parent class)
                  
> 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: Brock Noland
>             Fix For: 1.0.0
>
>         Attachments: mrunit-125-patch.diff, mrunit-125-spoiler.diff, mrunit-125.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

        

[jira] [Comment Edited] (MRUNIT-125) reduce duplicate code related to fluent methods with generics

Posted by "Bertrand Dechoux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MRUNIT-125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13429099#comment-13429099 ] 

Bertrand Dechoux edited comment on MRUNIT-125 at 8/6/12 12:00 PM:
------------------------------------------------------------------

> Good work Bertrand. A question though - the fluent methods work well now in the base classes, so why do we still need them in the individual drivers? If we don't delete them, we've got more duplication than when we started! I think these can be safely removed now. 

That's clearly an error. I did remove them for the first patch, maybe I missed a few of them when I updated the version of my working copy. Would that make sense to you if I add a final keyword to all of these methods? It would help me and I don't see any reasons for not doing so. Worst case, we could remove the final keyword later if needed and it shouldn't impact anybody.

Anyway, I cannot check now but if I do need to change my patch, how we do it? I submit a patch on the patch? (Brock did commit it.)

> Also - please be careful not to lose the @Deprecated markers that James introduced in MRUNIT-64, and watch out for javadoc warnings following the code move. 

I clearly saw them in the patch of MRUNIT-64 but not in the trunk... I will check again.

                
      was (Author: bdechoux):
    Good work Bertrand. A question though - the fluent methods work well now in the base classes, so why do we still need them in the individual drivers? If we don't delete them, we've got more duplication than when we started! I think these can be safely removed now. 

> That's clearly an error. I did remove them for the first patch, maybe I missed a few of them when I updated the version of my working copy. Would that make sense to you if I add a final keyword to all of these methods? It would help me and I don't see any reasons for not doing so. Worst case, we could remove the final keyword later if needed and it shouldn't impact anybody.

> Anyway, I cannot  check now but if I do need to change my patch, how we do it? I submit a patch on the patch? (Brock did commit it.)

Also - please be careful not to lose the @Deprecated markers that James introduced in MRUNIT-64, and watch out for javadoc warnings following the code move. 

> I clearly saw them in the patch of MRUNIT-64 but not in the trunk... I will check again.

                  
> 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-patch.diff, mrunit-125-spoiler.diff, mrunit-125.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

        

[jira] [Assigned] (MRUNIT-125) reduce duplicate code related to fluent methods with generics

Posted by "Jarek Jarcec Cecho (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MRUNIT-125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jarek Jarcec Cecho reassigned MRUNIT-125:
-----------------------------------------

    Assignee: Jarek Jarcec Cecho
    
> 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: Jarek Jarcec Cecho
>             Fix For: 1.0.0
>
>
> 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

        

[jira] [Commented] (MRUNIT-125) reduce duplicate code related to fluent methods with generics

Posted by "Brock Noland (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MRUNIT-125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13427685#comment-13427685 ] 

Brock Noland commented on MRUNIT-125:
-------------------------------------

Yes I can review this as well.
                
> 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: Brock Noland
>             Fix For: 1.0.0
>
>         Attachments: mrunit-125-patch.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

        

[jira] [Updated] (MRUNIT-125) reduce duplicate code related to fluent methods with generics

Posted by "Bertrand Dechoux (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MRUNIT-125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bertrand Dechoux updated MRUNIT-125:
------------------------------------

    Attachment:     (was: mrunit-125-spoiler.diff)
    
> 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
>
>
> 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

        

[jira] [Updated] (MRUNIT-125) reduce duplicate code related to fluent methods with generics

Posted by "Bertrand Dechoux (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MRUNIT-125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bertrand Dechoux updated MRUNIT-125:
------------------------------------

    Attachment: mrunit-125-spoiler.diff
    
> 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

        

[jira] [Commented] (MRUNIT-125) reduce duplicate code related to fluent methods with generics

Posted by "Jim Donofrio (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MRUNIT-125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13424722#comment-13424722 ] 

Jim Donofrio commented on MRUNIT-125:
-------------------------------------

Bertrand,

I committed MRUNIT-119
                
> 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: Jarek Jarcec Cecho
>             Fix For: 1.0.0
>
>
> 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