public class MergeJoinIndexer extends LoadFunc
Constructor and Description |
---|
MergeJoinIndexer(java.lang.String funcSpec,
java.lang.String innerPlan,
java.lang.String serializedPhyPlan,
java.lang.String udfCntxtSignature,
java.lang.String scope,
java.lang.String ignoreNulls) |
Modifier and Type | Method and Description |
---|---|
org.apache.hadoop.mapreduce.InputFormat |
getInputFormat()
This will be called during planning on the front end.
|
LoadCaster |
getLoadCaster()
This will be called on the front end during planning and not on the back
end during execution.
|
Tuple |
getNext()
Retrieves the next tuple to be processed.
|
void |
prepareToRead(org.apache.hadoop.mapreduce.RecordReader reader,
PigSplit split)
Initializes LoadFunc for reading data.
|
void |
setLocation(java.lang.String location,
org.apache.hadoop.mapreduce.Job job)
Communicate to the loader the location of the object(s) being loaded.
|
getAbsolutePath, getCacheFiles, getPathStrings, getShipFiles, join, relativeToAbsolutePath, setUDFContextSignature, warn
public MergeJoinIndexer(java.lang.String funcSpec, java.lang.String innerPlan, java.lang.String serializedPhyPlan, java.lang.String udfCntxtSignature, java.lang.String scope, java.lang.String ignoreNulls) throws ExecException
funcSpec
- : Loader specification.innerPlan
- : This is serialized version of LR plan. We
want to keep only keys in our index file and not the whole tuple. So, we need LR and thus its plan
to get keys out of the sampled tuple.serializedPhyPlan
- Serialized physical plan on right side.ExecException
public Tuple getNext() throws java.io.IOException
LoadFunc
public org.apache.hadoop.mapreduce.InputFormat getInputFormat() throws java.io.IOException
LoadFunc
getInputFormat
in class LoadFunc
java.io.IOException
- if there is an exception during InputFormat
constructionpublic LoadCaster getLoadCaster() throws java.io.IOException
LoadFunc
getLoadCaster
in class LoadFunc
LoadCaster
associated with this loader. Returning null
indicates that casts from byte array are not supported for this loader.
constructionjava.io.IOException
- if there is an exception during LoadCasterpublic void prepareToRead(org.apache.hadoop.mapreduce.RecordReader reader, PigSplit split) throws java.io.IOException
LoadFunc
prepareToRead
in class LoadFunc
reader
- RecordReader
to be used by this instance of the LoadFuncsplit
- The input PigSplit
to processjava.io.IOException
- if there is an exception during initializationpublic void setLocation(java.lang.String location, org.apache.hadoop.mapreduce.Job job) throws java.io.IOException
LoadFunc
LoadFunc.relativeToAbsolutePath(String, Path)
. Implementations
should use this method to communicate the location (and any other information)
to its underlying InputFormat through the Job object.
This method will be called in the frontend and backend multiple times. Implementations
should bear in mind that this method is called multiple times and should
ensure there are no inconsistent side effects due to the multiple calls.setLocation
in class LoadFunc
location
- Location as returned by
LoadFunc.relativeToAbsolutePath(String, Path)
job
- the Job
object
store or retrieve earlier stored information from the UDFContext
java.io.IOException
- if the location is not valid.Copyright © 2007-2012 The Apache Software Foundation