[ 
https://issues.apache.org/jira/browse/MAPREDUCE-4851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13511476#comment-13511476
 ] 

Radim Kolar commented on MAPREDUCE-4851:
----------------------------------------

Actually entire API including mapper/reducer could be reworked into standard 
JEE component which means:

1. make it java bean
2. @PostConstruct annotated initmethod
3. @PreDestroy annotated shutdown method

and container will handle super classes and init/shutdown them in right order. 
But i do not think that community is capable of making such design decisions, 
so i am aiming for something simple and similar to an existing code.
                
> add lifecycle to Comparators
> ----------------------------
>
>                 Key: MAPREDUCE-4851
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4851
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>            Reporter: Radim Kolar
>              Labels: mrv2
>
> current mapreduce api is using RawComparator interface in:
> setGroupingComparatorClass
> setSortComparatorClass
> This interface has no lifecycle support. I propose to change that methods to 
> take argument new class implements RawComparator with setup and cleanup 
> methods. 
> This will leave existing code with RawComparator alone, Providing some 
> backward compatibility.
> new class: 
> class SortComparator implements RawComparator

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to