|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
@InterfaceAudience.Public @InterfaceStability.Evolving public interface LoadMetadata
This interface defines how to retrieve metadata related to data to be loaded. If a given loader does not implement this interface, it will be assumed that it is unable to provide metadata about the associated data.
| Method Summary | |
|---|---|
String[] |
getPartitionKeys(String location,
org.apache.hadoop.mapreduce.Job job)
Find what columns are partition keys for this input. |
ResourceSchema |
getSchema(String location,
org.apache.hadoop.mapreduce.Job job)
Get a schema for the data to be loaded. |
ResourceStatistics |
getStatistics(String location,
org.apache.hadoop.mapreduce.Job job)
Get statistics about the data to be loaded. |
void |
setPartitionFilter(Expression partitionFilter)
Set the filter for partitioning. |
| Method Detail |
|---|
ResourceSchema getSchema(String location,
org.apache.hadoop.mapreduce.Job job)
throws IOException
location - 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
ResourceStatistics getStatistics(String location,
org.apache.hadoop.mapreduce.Job job)
throws IOException
LoadFunc, then LoadFunc.setLocation(String, org.apache.hadoop.mapreduce.Job)
is guaranteed to be called before this method.
location - 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
String[] getPartitionKeys(String location,
org.apache.hadoop.mapreduce.Job job)
throws IOException
location - 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
void setPartitionFilter(Expression partitionFilter)
throws IOException
getPartitionKeys(String, 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.
partitionFilter - 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 | |||||||||