public class URLPartitioner extends Object implements org.apache.hadoop.mapred.Partitioner<org.apache.hadoop.io.Text,org.apache.hadoop.io.Writable>
| Modifier and Type | Field and Description |
|---|---|
static String |
PARTITION_MODE_DOMAIN |
static String |
PARTITION_MODE_HOST |
static String |
PARTITION_MODE_IP |
static String |
PARTITION_MODE_KEY |
| Constructor and Description |
|---|
URLPartitioner() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
configure(org.apache.hadoop.mapred.JobConf job) |
int |
getPartition(org.apache.hadoop.io.Text key,
org.apache.hadoop.io.Writable value,
int numReduceTasks)
Hash by domain name.
|
public static final String PARTITION_MODE_KEY
public static final String PARTITION_MODE_HOST
public static final String PARTITION_MODE_DOMAIN
public static final String PARTITION_MODE_IP
public void configure(org.apache.hadoop.mapred.JobConf job)
configure in interface org.apache.hadoop.mapred.JobConfigurablepublic void close()
public int getPartition(org.apache.hadoop.io.Text key,
org.apache.hadoop.io.Writable value,
int numReduceTasks)
getPartition in interface org.apache.hadoop.mapred.Partitioner<org.apache.hadoop.io.Text,org.apache.hadoop.io.Writable>Copyright © 2014 The Apache Software Foundation