You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Doug Cutting (JIRA)" <ji...@apache.org> on 2006/11/10 20:22:38 UTC

[jira] Commented: (HADOOP-689) hadoop should provide a common way to wrap instances with different types into one type

    [ http://issues.apache.org/jira/browse/HADOOP-689?page=comments#action_12448829 ] 
            
Doug Cutting commented on HADOOP-689:
-------------------------------------

Overall this looks good.  A few issues.

1. A new array of classes should not be allocated for each call to readFields().  Perhaps instead introspection should be used to call a static getTypes() method and somehow cache this per subclass.  At the least, the example code should create the array as a static field, and then have the getTypes() implementation return a reference to this.

2. set(), get(), and getTypes() need javadoc.


> hadoop should provide a common way to wrap instances with different types into one type
> ---------------------------------------------------------------------------------------
>
>                 Key: HADOOP-689
>                 URL: http://issues.apache.org/jira/browse/HADOOP-689
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: io
>         Environment: All environment
>            Reporter: Feng Jiang
>         Attachments: HADOOP-689.patch
>
>
> When two sequence files, which have same Key type but different Value types, are mapped out to reduce, multiple Value types is not allowed. In this case, we need a way to wrap instances with different types into one class type to reduce.
> In current code, ObjectWritable is a sole choice. but it costs too many space, because the class declaration will be appended into output file as a string for every Key-value pair.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira