hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "madhukara phatak (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-8549) Allow other implementation's of java.util.Map in MapWritable
Date Mon, 16 Jul 2012 06:14:34 GMT

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

madhukara phatak commented on HADOOP-8549:
------------------------------------------

bq. Why can we hence not have a MapWritable(Class <? extends Map<Writable, Writable>>
mapType) that then instantiates the class for the field member "instance", rather than a dev
hacking like that?
  AFAIK in M/R writable's  are instantiated through default constructor, which means the above
constructor will not be called. So if I want to have a custom Map instance implementation
it has to be in read/write methods. Please correct me if I am wrong :) 
                
> Allow other implementation's of java.util.Map in MapWritable
> ------------------------------------------------------------
>
>                 Key: HADOOP-8549
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8549
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: io
>    Affects Versions: 2.0.0-alpha
>            Reporter: madhukara phatak
>            Assignee: madhukara phatak
>            Priority: Minor
>         Attachments: HADOOP-8549.patch
>
>
> Current implementation of MapWritable uses HashMap as Map implementation. But in some
of the use cases we need other implementations of Map like LinkedHashMap,SortedMap.This jira
changes visibility of 'instance' in MapWritable from private to protected which allows us
to inject custom Map implementation through sub classing MapWritable  .  

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

        

Mime
View raw message