|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pig.piggybank.storage.partition.PathPartitionHelper
public class PathPartitionHelper
Implements the logic for:
Field Summary | |
---|---|
static String |
PARITITION_FILTER_EXPRESSION
|
static String |
PARTITION_COLUMNS
|
Constructor Summary | |
---|---|
PathPartitionHelper()
|
Method Summary | |
---|---|
Set<String> |
getPartitionKeys(String location,
org.apache.hadoop.conf.Configuration conf)
Returns the partition keys for a location. The work is delegated to the PathPartitioner class |
Map<String,String> |
getPathPartitionKeyValues(String location)
Returns the Partition keys and each key's value for a single location. That is the location must be something like mytable/partition1=a/partition2=b/myfile. This method will return a map with [partition1='a', partition2='b'] The work is delegated to the PathPartitioner class |
List<org.apache.hadoop.fs.FileStatus> |
listStatus(org.apache.hadoop.mapreduce.JobContext ctx,
Class<? extends LoadFunc> loaderClass,
String signature)
This method is called by the FileInputFormat to find the input paths for which splits should be calculated. If applyDateRanges == true: Then the HiveRCDateSplitter is used to apply filtering on the input files. Else the default FileInputFormat listStatus method is used. |
void |
setPartitionFilterExpression(String partitionFilterExpression,
Class<? extends LoadFunc> loaderClass,
String signature)
Sets the PARITITION_FILTER_EXPRESSION property in the UDFContext identified by the loaderClass. |
void |
setPartitionKeys(String location,
org.apache.hadoop.conf.Configuration conf,
Class<? extends LoadFunc> loaderClass,
String signature)
Reads the partition keys from the location i.e the base directory |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PARTITION_COLUMNS
public static final String PARITITION_FILTER_EXPRESSION
Constructor Detail |
---|
public PathPartitionHelper()
Method Detail |
---|
public Map<String,String> getPathPartitionKeyValues(String location) throws IOException
location
-
IOException
public Set<String> getPartitionKeys(String location, org.apache.hadoop.conf.Configuration conf) throws IOException
location
- String must be the base directory for the partitionsconf
-
IOException
public void setPartitionFilterExpression(String partitionFilterExpression, Class<? extends LoadFunc> loaderClass, String signature) throws IOException
partitionFilterExpression
- loaderClass
-
IOException
public void setPartitionKeys(String location, org.apache.hadoop.conf.Configuration conf, Class<? extends LoadFunc> loaderClass, String signature) throws IOException
location
- String must be the base directory for the partitionsconf
- loaderClass
-
IOException
public List<org.apache.hadoop.fs.FileStatus> listStatus(org.apache.hadoop.mapreduce.JobContext ctx, Class<? extends LoadFunc> loaderClass, String signature) throws IOException
ctx
- JobContextloaderClass
- this is chosen to be a subclass of LoadFunc to maintain some
consistency.
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |