Package org.terrier.structures.indexing.singlepass.hadoop.SplitEmittedTerm

Examples of org.terrier.structures.indexing.singlepass.hadoop.SplitEmittedTerm.SETPartitioner


  /** single map, single reducer */
  public void testSMSRCalculatePartition() throws Exception
  {
    final JobConf j = new JobConf();
    j.setNumMapTasks(1);
    final SETPartitioner p = new SETPartitioner();
    p.configure(j);
    assertEquals(0, p.calculatePartition(0, 1));
  }
View Full Code Here


  public void testMMSRCalculatePartition() throws Exception
  {
    final JobConf j = new JobConf();
    final int maptasks = 20;
    j.setNumMapTasks(maptasks);
    final SETPartitioner p = new SETPartitioner();
    p.configure(j);
    assertEquals(0, p.calculatePartition(0, 1));
    assertEquals(0, p.calculatePartition(19, 1));
    assertEquals(0, p.calculatePartition(10, 1));
   
   
  }
View Full Code Here

  public void testMMMRCalculatePartition() throws Exception
  {
    final JobConf j = new JobConf();
    final int maptasks = 20;
    j.setNumMapTasks(maptasks);
    final SETPartitioner p = new SETPartitioner();
    p.configure(j);
   
    assertEquals(0, p.calculatePartition(0, 2));
    assertEquals(0, p.calculatePartition(1, 2));
    assertEquals(0, p.calculatePartition(9, 2));
    assertEquals(1, p.calculatePartition(10, 2));
    assertEquals(1, p.calculatePartition(19, 2));
  }
View Full Code Here

TOP

Related Classes of org.terrier.structures.indexing.singlepass.hadoop.SplitEmittedTerm.SETPartitioner

Copyright © 2018 www.massapicom. 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.