public class PathPartitioner extends 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 |
---|---|
Set<String> |
getPartitionKeys(String location,
org.apache.hadoop.conf.Configuration conf)
Searches for the key=value pairs in the path pointer by the location
parameter.
|
Map<String,String> |
getPathPartitionKeyValues(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.
|
String[] |
parsePathKeyValue(String path)
Will look for key=value pairs in the path for example:
/user/hive/warehouse/mylogs/year=2010/month=07
|
public Map<String,String> getPathPartitionKeyValues(String location) throws IOException
location
- String root path in hdsf e.g. /user/hive/warehouse or
/logs/repoconf
- ConfigurationIOException
public Set<String> getPartitionKeys(String location, org.apache.hadoop.conf.Configuration conf) throws IOException
location
- String root path in hdsf e.g. /user/hive/warehouse or
/logs/repoconf
- ConfigurationIOException
Copyright © 2007-2017 The Apache Software Foundation