|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.pig.LoadFunc
com.ning.metrics.serialization.hadoop.pig.ThriftStorage
public class ThriftStorage
| Constructor Summary | |
|---|---|
ThriftStorage(String schemaName)
|
|
ThriftStorage(String schemaName,
String goodwillHost,
int goodwillPort)
|
|
| Method Summary | |
|---|---|
org.apache.hadoop.mapreduce.InputFormat |
getInputFormat()
This will be called during planning on the front end. |
org.apache.pig.data.Tuple |
getNext()
|
String[] |
getPartitionKeys(String location,
org.apache.hadoop.mapreduce.Job job)
Find what columns are partition keys for this input. |
org.apache.pig.ResourceSchema |
getSchema(String location,
org.apache.hadoop.mapreduce.Job job)
Get a schema for the data to be loaded. |
org.apache.pig.ResourceStatistics |
getStatistics(String location,
org.apache.hadoop.mapreduce.Job job)
Get statistics about the data to be loaded. |
void |
prepareToRead(org.apache.hadoop.mapreduce.RecordReader reader,
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigSplit split)
Initializes LoadFunc for reading data. |
void |
setLocation(String location,
org.apache.hadoop.mapreduce.Job job)
Communicate to the loader the location of the object(s) being loaded. |
void |
setPartitionFilter(org.apache.pig.Expression partitionFilter)
Set the filter for partitioning. |
| Methods inherited from class org.apache.pig.LoadFunc |
|---|
getAbsolutePath, getLoadCaster, getPathStrings, join, relativeToAbsolutePath, setUDFContextSignature |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ThriftStorage(String schemaName)
throws IOException
IOException
public ThriftStorage(String schemaName,
String goodwillHost,
int goodwillPort)
throws IOException
IOException| Method Detail |
|---|
public void setLocation(String location,
org.apache.hadoop.mapreduce.Job job)
throws IOException
LoadFunc.relativeToAbsolutePath(String, org.apache.hadoop.fs.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 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 org.apache.pig.LoadFunclocation - Location as returned by
LoadFunc.relativeToAbsolutePath(String, org.apache.hadoop.fs.Path)job - the Job object
store or retrieve earlier stored information from the org.apache.pig.impl.util.UDFContext
IOException - if the location is not valid.
public org.apache.hadoop.mapreduce.InputFormat getInputFormat()
throws IOException
getInputFormat in class org.apache.pig.LoadFuncIOException - if there is an exception during InputFormat
construction
public void prepareToRead(org.apache.hadoop.mapreduce.RecordReader reader,
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigSplit split)
throws IOException
prepareToRead in class org.apache.pig.LoadFuncreader - RecordReader to be used by this instance of the LoadFuncsplit - The input PigSplit to process
IOException - if there is an exception during initialization
public org.apache.pig.data.Tuple getNext()
throws IOException
getNext in class org.apache.pig.LoadFuncIOException
public org.apache.pig.ResourceSchema getSchema(String location,
org.apache.hadoop.mapreduce.Job job)
throws IOException
getSchema in interface org.apache.pig.LoadMetadatalocation - Location as returned by
LoadFunc.relativeToAbsolutePath(String, org.apache.hadoop.fs.Path)job - The Job object - this should be used only to obtain
cluster properties through JobContext.getConfiguration() and not to set/query
any runtime job information.
IOException - if an exception occurs while determining the schema
public org.apache.pig.ResourceStatistics getStatistics(String location,
org.apache.hadoop.mapreduce.Job job)
throws IOException
getStatistics in interface org.apache.pig.LoadMetadatalocation - Location as returned by
LoadFunc.relativeToAbsolutePath(String, org.apache.hadoop.fs.Path)job - The Job object - this should be used only to obtain
cluster properties through JobContext.getConfiguration() and not to set/query
any runtime job information.
IOException - if an exception occurs while retrieving statistics
public String[] getPartitionKeys(String location,
org.apache.hadoop.mapreduce.Job job)
throws IOException
getPartitionKeys in interface org.apache.pig.LoadMetadatalocation - Location as returned by
LoadFunc.relativeToAbsolutePath(String, org.apache.hadoop.fs.Path)job - The Job object - this should be used only to obtain
cluster properties through JobContext.getConfiguration() and not to set/query
any runtime job information.
IOException - if an exception occurs while retrieving partition keys
public void setPartitionFilter(org.apache.pig.Expression partitionFilter)
throws IOException
getPartitionKeys(String, org.apache.hadoop.mapreduce.Job), then this method is not
called by Pig runtime. This method is also not called by the Pig runtime
if there are no partition filter conditions.
setPartitionFilter in interface org.apache.pig.LoadMetadatapartitionFilter - that describes filter for partitioning
IOException - if the filter is not compatible with the storage
mechanism or contains non-partition fields.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||