public class PathPartitioner
extends java.lang.Object
/logs/repo/mylog/ daydate=2010-01-01 daydate=2010-01-02This class accepts a path like /logs/repo/mylog and return a map of the partition keys
Constructor and Description |
---|
PathPartitioner() |
Modifier and Type | Method and Description |
---|---|
java.util.Set<java.lang.String> |
getPartitionKeys(java.lang.String location,
org.apache.hadoop.conf.Configuration conf)
Searches for the key=value pairs in the path pointer by the location
parameter.
|
java.util.Map<java.lang.String,java.lang.String> |
getPathPartitionKeyValues(java.lang.String location)
Note: this must be the path lowes in the Searches for the key=value pairs
in the path pointer by the location parameter.
|
java.lang.String[] |
parsePathKeyValue(java.lang.String path)
Will look for key=value pairs in the path for example:
/user/hive/warehouse/mylogs/year=2010/month=07
|
public java.util.Map<java.lang.String,java.lang.String> getPathPartitionKeyValues(java.lang.String location) throws java.io.IOException
location
- String root path in hdsf e.g. /user/hive/warehouse or
/logs/repoconf
- Configurationjava.io.IOException
public java.util.Set<java.lang.String> getPartitionKeys(java.lang.String location, org.apache.hadoop.conf.Configuration conf) throws java.io.IOException
location
- String root path in hdsf e.g. /user/hive/warehouse or
/logs/repoconf
- Configurationjava.io.IOException
public java.lang.String[] parsePathKeyValue(java.lang.String path)
path
- Copyright © 2007-2012 The Apache Software Foundation