Richard Ding commented on PIG-966:

Since two methods on LoadFunc interface have default implementation 
(massageFilename for relativeToAbsolutePath, Utf8StorageConverter for 
getLoadCaster) that many implementers of LoadFunc can use,  we propose to 
change LoadFunc to an abstract class. Use of abstract class also allows us to 
make backward-compatible changes to the API in later releases. One drawback is 
that the corresponding StoreFunc can't be an abstract class, since PigStorage 
now implements both interfaces and Java doesn't allow multiple inheritance. But 
we think it worthwhile to make the change.

Another proposal is to make both LoadFunc and StoreFunc generic types. Both are 
using Hadoop's generic types (e.g. InputFormat, OutputFormat, RecordReader, 
RecordWriter) in their methods . Change to generic types will provide 
compile-time type checking, reduce Javac warnings, and force the implementers 
to specify the input/output types.

Any comments?


> Proposed rework for LoadFunc, StoreFunc, and Slice/r interfaces
> ---------------------------------------------------------------
>                 Key: PIG-966
>                 URL: https://issues.apache.org/jira/browse/PIG-966
>             Project: Pig
>          Issue Type: Improvement
>          Components: impl
>            Reporter: Alan Gates
>            Assignee: Alan Gates
> I propose that we rework the LoadFunc, StoreFunc, and Slice/r interfaces 
> significantly.  See http://wiki.apache.org/pig/LoadStoreRedesignProposal for 
> full details

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

Reply via email to