pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashutosh Chauhan (JIRA)" <j...@apache.org>
Subject [jira] Updated: (PIG-1363) Unnecessary loadFunc instantiations
Date Tue, 13 Apr 2010 00:13:48 GMT

     [ https://issues.apache.org/jira/browse/PIG-1363?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Ashutosh Chauhan updated PIG-1363:

    Attachment: pig-1363.patch

Ideal solution of this problem is to have {{{LoadFunc}}} implements {{{Serializable}}}. Then
LoadFunc will be instantiated once first time its needed (in LoLoad) and then everywhere this
one object is used. But this will be backward incompatible as all the load func implementation
then have to be necessarily implement Serializable. So, for now we will live with this. 
This patch gets rid of the multiple load func instantiation in front end where it could be
avoided without the need of making it Serializable. No test cases are needed since this is
purely code cleanup and doesn't add/delete/modify any existing functionality, so current regression
tests suffice. 

> Unnecessary loadFunc instantiations
> -----------------------------------
>                 Key: PIG-1363
>                 URL: https://issues.apache.org/jira/browse/PIG-1363
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.7.0
>            Reporter: Ashutosh Chauhan
>             Fix For: 0.8.0
>         Attachments: pig-1363.patch
> In MRCompiler loadfuncs are instantiated at multiple locations in different visit methods.
This is inconsistent and confusing. LoadFunc should be instantiated at only one place, ideally
in LogToPhyTanslation#visit(LOLoad). A getter should be added to POLoad to retrieve this instantiated
loadFunc wherever it is needed in later stages of compilation. 

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


View raw message