Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added the support of facet counts for the map reduce
- Loading branch information
vzhabiuk
committed
Jun 8, 2012
1 parent
a99979b
commit adf9d0c
Showing
3 changed files
with
43 additions
and
7 deletions.
There are no files selected for viewing
28 changes: 26 additions & 2 deletions
28
bobo-browse/src/main/java/com/browseengine/bobo/mapred/BoboMapFunctionWrapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,35 @@ | ||
package com.browseengine.bobo.mapred; | ||
|
||
import java.util.List; | ||
|
||
import com.browseengine.bobo.api.BoboIndexReader; | ||
import com.browseengine.bobo.facets.FacetCountCollector; | ||
|
||
/** | ||
* Is the part of the bobo request, that maintains the map result intermediate state | ||
* | ||
*/ | ||
public interface BoboMapFunctionWrapper { | ||
public void mapFullIndexReader(BoboIndexReader reader); | ||
/** | ||
* When there is no filter, map reduce will try to map the entire segment | ||
* @param reader | ||
*/ | ||
public void mapFullIndexReader(BoboIndexReader reader, FacetCountCollector[] facetCountCollectors); | ||
/** | ||
* The basic callback method for a single doc | ||
* @param docId | ||
* @param reader | ||
*/ | ||
public void mapSingleDocument(int docId, BoboIndexReader reader); | ||
public void finalizeSegment(BoboIndexReader reader); | ||
/** | ||
* The callback method, after the segment was processed | ||
* @param reader | ||
*/ | ||
public void finalizeSegment(BoboIndexReader reader, FacetCountCollector[] facetCountCollectors); | ||
/** | ||
* The callback method, after the partition was processed | ||
* | ||
*/ | ||
public void finalizePartition(); | ||
public MapReduceResult getResult(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters