hadoop-pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xuefu Zhang (JIRA)" <j...@apache.org>
Subject [jira] Commented: (PIG-1292) Interface Refinements
Date Fri, 12 Mar 2010 18:36:27 GMT

    [ https://issues.apache.org/jira/browse/PIG-1292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12844604#action_12844604

Xuefu Zhang commented on PIG-1292:

If the response to #2 is the assumption, then don't create a new interface with a single method
in it. Put this method in any existing interfaces, say, as an abstract method in LoadFunc
itself. If a loader is absolutely incapable, then return false always. Otherwise, if the loader's
answer varies case-by-case, then return true/false selectively in the implementation. 

In general, I think an API should be simple and clear. I can image that other developers may
have the same difficulty understanding what's this interface about.

FYI, Zebra TableLoader now extends one parent class, and implements FIVE interfaces. With
this trend, it may grow even more. To me, this seems excessive.

> Interface Refinements
> ---------------------
>                 Key: PIG-1292
>                 URL: https://issues.apache.org/jira/browse/PIG-1292
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.7.0
>            Reporter: Ashutosh Chauhan
>            Assignee: Ashutosh Chauhan
>             Fix For: 0.7.0
>         Attachments: pig-interfaces.patch
> A loader can't implement both OrderedLoadFunc and IndexableLoadFunc, as both are abstract
classes instead of being interfaces.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message