Package org.apache.nutch.crawl.GeneratorJob

Examples of org.apache.nutch.crawl.GeneratorJob.SelectorEntry


    try {
      score = scoringFilters.generatorSortValue(url, page, score);
    } catch (ScoringFilterException e) {
      //ignore
    }
    SelectorEntry entry = new SelectorEntry(url, score);
    context.write(entry, page);
  }
View Full Code Here


   
    int numReduceTasks = 100;
   
    int partitionFromRef = refPartitioner.getPartition("http://www.example.org/", numReduceTasks);
    //init selector entry (score shouldn't matter)
    SelectorEntry selectorEntry = new SelectorEntry("http://www.example.org/", 1337);
    WebPage page = new WebPage();
    int partitionFromSig = sigPartitioner.getPartition(selectorEntry, page, numReduceTasks);
   
    assertEquals("partitions should be same",
        partitionFromRef, partitionFromSig);
View Full Code Here

   
    int numReduceTasks = 100;
   
    int partitionFromRef = refPartitioner.getPartition("http://www.example.org/", numReduceTasks);
    //init selector entry (score shouldn't matter)
    SelectorEntry selectorEntry = new SelectorEntry("http://www.example.org/", 1337);
    WebPage page = new WebPage();
    int partitionFromSig = sigPartitioner.getPartition(selectorEntry, page, numReduceTasks);
   
    assertEquals("partitions should be same",
        partitionFromRef, partitionFromSig);
View Full Code Here

TOP

Related Classes of org.apache.nutch.crawl.GeneratorJob.SelectorEntry

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.