JobConf jc = new JobConf();
jc.set("CompressingMetaIndexBuilder.reverse.keyCount", "2");
jc.set("CompressingMetaIndexBuilder.reverse.keys", "docno,url,domain");
jc.setNumReduceTasks(2);
KeyedPartitioner p = new KeyedPartitioner();
p.configure(jc);
KeyValueTuple kv1 = new KeyValueTuple("docno", "doc1");
IntWritable docid = new IntWritable(0);
assertEquals(0, p.getPartition(kv1, docid, 2));
KeyValueTuple kv2 = new KeyValueTuple("url", "url1");
assertEquals(1, p.getPartition(kv2, docid, 2));