org.terrier.structures.indexing.singlepass.hadoop
Class Inv2DirectMultiReduce.ByDocidPartitioner<K>

java.lang.Object
  extended by org.terrier.structures.indexing.singlepass.hadoop.Inv2DirectMultiReduce.ByDocidPartitioner<K>
All Implemented Interfaces:
org.apache.hadoop.mapred.JobConfigurable, org.apache.hadoop.mapred.Partitioner<org.apache.hadoop.io.VIntWritable,K>
Direct Known Subclasses:
Inv2DirectMultiReduce.ByDocidPartitionerPosting
Enclosing class:
Inv2DirectMultiReduce

public static class Inv2DirectMultiReduce.ByDocidPartitioner<K>
extends java.lang.Object
implements org.apache.hadoop.mapred.Partitioner<org.apache.hadoop.io.VIntWritable,K>

Partitioner partitioning by docid


Constructor Summary
Inv2DirectMultiReduce.ByDocidPartitioner()
           
 
Method Summary
 void configure(org.apache.hadoop.mapred.JobConf job)
           
 int getPartition(org.apache.hadoop.io.VIntWritable docid, K posting, int numberOfReducers)
           
static void setNumberOfDocments(org.apache.hadoop.mapred.JobConf job, int numDocs)
          set number of documents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Inv2DirectMultiReduce.ByDocidPartitioner

public Inv2DirectMultiReduce.ByDocidPartitioner()
Method Detail

getPartition

public int getPartition(org.apache.hadoop.io.VIntWritable docid,
                        K posting,
                        int numberOfReducers)
Specified by:
getPartition in interface org.apache.hadoop.mapred.Partitioner<org.apache.hadoop.io.VIntWritable,K>

configure

public void configure(org.apache.hadoop.mapred.JobConf job)
Specified by:
configure in interface org.apache.hadoop.mapred.JobConfigurable

setNumberOfDocments

public static void setNumberOfDocments(org.apache.hadoop.mapred.JobConf job,
                                       int numDocs)
set number of documents

Parameters:
job -
numDocs -


Terrier 3.5. Copyright © 2004-2011 University of Glasgow