Package org.terrier.structures.indexing.CompressingMetaIndexBuilder

Examples of org.terrier.structures.indexing.CompressingMetaIndexBuilder.KeyedPartitioner.configure()


    JobConf jc = new JobConf();
    jc.set("CompressingMetaIndexBuilder.reverse.keyCount", "1");
    jc.set("CompressingMetaIndexBuilder.reverse.keys", "docno");
   
    KeyedPartitioner p = new KeyedPartitioner();
    p.configure(jc);
    KeyValueTuple kv = new KeyValueTuple("docno", "doc1");
    IntWritable docid = new IntWritable(0);
    assertEquals(0, p.getPartition(kv, docid, 1));
  }
 
View Full Code Here


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

    JobConf jc = new JobConf();
    jc.set("CompressingMetaIndexBuilder.reverse.keyCount", "2");
    jc.set("CompressingMetaIndexBuilder.reverse.keys", "docno,url");
    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));       
View Full Code Here

    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));
View Full Code Here

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

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.