|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@InterfaceAudience.Public @InterfaceStability.Evolving public interface IndexableLoadFunc
This class is intended for use by LoadFunc implementations which have an internal index for sorted data and can use the index to support merge join in Pig. Interaction with the index is abstracted away by the methods in this interface which the Pig runtime will call in a particular sequence to get the records it needs to perform the merge based join. The sequence of calls made from the Pig runtime are:
LoadFunc.setUDFContextSignature(String)
initialize(Configuration)
LoadFunc.setLocation(String, org.apache.hadoop.mapreduce.Job)
seekNear(Tuple)
LoadFunc.getNext()
called multiple times to retrieve data and perform the join
close()
Method Summary | |
---|---|
void |
close()
A method called by the Pig runtime to give an opportunity for implementations to perform cleanup actions like closing the underlying input stream. |
void |
initialize(org.apache.hadoop.conf.Configuration conf)
This method is called by Pig run time to allow the IndexableLoadFunc to perform any initialization actions |
void |
seekNear(Tuple keys)
This method is called by the Pig runtime to indicate to the LoadFunc to position its underlying input stream near the keys supplied as the argument. |
Method Detail |
---|
void initialize(org.apache.hadoop.conf.Configuration conf) throws IOException
conf
- The job configuration object
IOException
void seekNear(Tuple keys) throws IOException
keys
- Tuple with join keys (which are a prefix of the sort
keys of the input data). For example if the data is sorted on
columns in position 2,4,5 any of the following Tuples are
valid as an argument value:
(fieldAt(2))
(fieldAt(2), fieldAt(4))
(fieldAt(2), fieldAt(4), fieldAt(5))
The following are some invalid cases:
(fieldAt(4))
(fieldAt(2), fieldAt(5))
(fieldAt(4), fieldAt(5))
IOException
- When the loadFunc is unable to position
to the required point in its input streamvoid close() throws IOException
IOException
- if the loadfunc is unable to perform
its close actions.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |